home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume90 / aplictns / plplot26 / part01 next >
Encoding:
Internet Message Format  |  1990-01-14  |  66.3 KB

  1. Path: xanth!cs.odu.edu!Amiga-Request
  2. From: Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v90i002: plplot 2.6 - C library for making scientific plots, Part01/12
  5. Message-ID: <10974@xanth.cs.odu.edu>
  6. Date: 14 Jan 90 23:12:15 GMT
  7. Sender: tadguy@cs.odu.edu
  8. Reply-To: Anthony M. Richardson <amr@dukee.egr.duke.edu>
  9. Lines: 2273
  10. Approved: tadguy@cs.odu.edu (Tad Guy)
  11.  
  12. Submitted-by: Anthony M. Richardson <amr@dukee.egr.duke.edu>
  13. Posting-number: Volume 90, Issue 002
  14. Archive-name: applications/plplot-2.6/part01
  15.  
  16. [ the six files in the fonts directory have been uuencoded, 
  17.   and one had to be split.  ...tad ]
  18.  
  19.    Here is the new, improved version of plplot that first appeared
  20. over a year ago.  This contains all the source necessary to create
  21. a scanned or linkable C library.  The code compiles as is with Lattice
  22. 5.04 and on the two unix machines I've ported it to (both sys v machines).
  23. This version includes a greatly improved Amiga intuition interface and
  24. preferences support for hardcopy. Several other device drivers are
  25. included (iff, aegis draw, plt:, postscript) and new drivers can be
  26. easily added.
  27.  
  28. PLPLOT is a library of C functions that are useful for making scientific plots.
  29. The PLPLOT library can be used to create standard x-y plots, semilog plots,
  30. log-log plots, contour plots, 3D plots, mesh plots, bar charts and pie
  31. charts. Multiple graphs (of the same or different sizes) may be placed
  32. on a single page with multiple lines in each graph. Different line
  33. styles, widths and colors are supported. A virtually infinite number
  34. of distinct area fill patterns may be used. There are almost 2000 characters
  35. in the extended character set. This includes four different fonts,
  36. the Greek alphabet and a host of mathematical, musical, and other symbols.
  37. The fonts can be scaled to any size for various effects.
  38.  
  39. Regards,
  40. Tony
  41.  
  42. #! /bin/sh
  43. # This is a shell archive.  Remove anything before this line, then unpack
  44. # it by saving it into a file and typing "sh file".  To overwrite existing
  45. # files, type "sh file -c".  You can also feed this as standard input via
  46. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  47. # will see the following message at the end:
  48. #        "End of archive 1 (of 12)."
  49. # Contents:  Amiga Amiga/Makefile README README.AMIGA README.CHANGES
  50. #   docs drivers drivers/Makefile examples examples/compexam
  51. #   examples/example02.c examples/example05.c examples/example09.c
  52. #   examples/example10.c fonts fonts/plstnd.idx.uu fonts/plstnd.lkp.uu
  53. #   include lattice lattice/README lattice/make-clean lattice/make-up
  54. #   pllibs pllibs/dummy src src/icnvrt.c src/movphy.c src/movwor.c
  55. #   src/pl3cut.c src/plabv.c src/pladv.c src/plbeg.c src/plclr.c
  56. #   src/plcol.c src/plcvec.c src/plend.c src/plerrx.c src/plerry.c
  57. #   src/plerx1.c src/plery1.c src/plexit.c src/plfont.c src/plgra.c
  58. #   src/plgspa.c src/pljoin.c src/pllab.c src/plline.c src/plmesh.c
  59. #   src/plpage.c src/plpat.c src/plpoi1.c src/plpoin.c src/plr135.c
  60. #   src/plr45.c src/plschr.c src/plsmaj.c src/plsmin.c src/plssym.c
  61. #   src/plstik.c src/plsym.c src/plsym1.c src/pltext.c src/plvsta.c
  62. #   src/plwid.c src/plxtik.c src/plytik.c src/setphy.c src/setpxl.c
  63. #   src/setsub.c src/stindex.c src/strpos.c src/stsearch.c src/xform.c
  64. #   unix unix/README
  65. # Wrapped by tadguy@xanth on Sun Jan 14 18:11:21 1990
  66. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  67. if test ! -d 'Amiga' ; then
  68.     echo shar: Creating directory \"'Amiga'\"
  69.     mkdir 'Amiga'
  70. fi
  71. if test -f 'Amiga/Makefile' -a "${1}" != "-c" ; then 
  72.   echo shar: Will not clobber existing file \"'Amiga/Makefile'\"
  73. else
  74. echo shar: Extracting \"'Amiga/Makefile'\" \(234 characters\)
  75. sed "s/^X//" >'Amiga/Makefile' <<'END_OF_FILE'
  76. X#
  77. X# Lattice definitions
  78. X#
  79. XCFLAGS = $(LFLG1) $(LFLG2) -i/include -O
  80. XCC = lc
  81. X#
  82. XOBJS  =  amiga.o \
  83. X         plmenu.o \
  84. X         plprefs.o \
  85. X         plsupport.o \
  86. X         plwindow.o
  87. X
  88. X.c.o:
  89. X        $(CC) $(CFLAGS) $*.c
  90. X
  91. Xlib:    $(OBJS)
  92. X
  93. END_OF_FILE
  94. if test 234 -ne `wc -c <'Amiga/Makefile'`; then
  95.     echo shar: \"'Amiga/Makefile'\" unpacked with wrong size!
  96. fi
  97. # end of 'Amiga/Makefile'
  98. fi
  99. if test -f 'README' -a "${1}" != "-c" ; then 
  100.   echo shar: Will not clobber existing file \"'README'\"
  101. else
  102. echo shar: Extracting \"'README'\" \(2659 characters\)
  103. sed "s/^X//" >'README' <<'END_OF_FILE'
  104. X                    Version 2.6 of PLPLOT
  105. XPLPLOT is a library of C functions that are useful for scientific plotting.
  106. XThe PLPLOT library can be used to create standard x-y plots, semilog plots,
  107. Xlog-log plots, contour plots, 3D plots, mesh plots, bar charts and pie
  108. Xcharts. Multiple graphs (of the same or different sizes) may be placed
  109. Xon a single page with multiple lines in each graph. Different line
  110. Xstyles, widths and colors are supported. A virtually infinite number
  111. Xof distinct area fill patterns may be used. There are almost 2000 characters
  112. Xin the extended character set. This includes four different fonts,
  113. Xthe Greek alphabet and a host of mathematical, musical, and other symbols.
  114. XThe fonts can be scaled to any size for various effects.
  115. X
  116. XTo create a library compatible with your compiler/system you need to go to
  117. Xthe appropriate directory (lattice, unix) and follow the directions
  118. Xin the README file there.
  119. X
  120. XRead the file README.CHANGES for a description of the changes/improvements
  121. Xmade in this version. (This version is not compatible with version 1.0
  122. Xin programs that do 3D or contour plots.) The Amiga interface
  123. Xhas been greatly improved and there have been a number of improvements
  124. Xin the portable code (all the stuff in the src directory) as well
  125. X(mesh plots, area fill routines, and a better method of handling the
  126. Xfonts).  Also read README.AMIGA if you are installing PLPLOT on an Amiga.
  127. X
  128. XMany thanks to Tom Rokicki (who provided the Preferences and IFF driver
  129. Xroutines), Sam Paolucci (he wrote the Postscript driver) and to
  130. XBob Wolff and Steve Walton (they provided several hints as to how to
  131. Xavoid Lattice/Manx incompatibilities. Note: This code may not work with
  132. XManx yet.  Steve got it to work, but I'm not sure if all the changes he
  133. Xmade are included in this version (I haven't been able to contact him,
  134. XI think his Internet feed is down)).  There were several people who
  135. Xhelped test this library and who made many suggestions. They are too
  136. Xnumerous to list but their help was greatly appreciated.
  137. X
  138. XEnjoy,
  139. X
  140. X   Tony Richardson
  141. X
  142. X   EMAIL   amr@dukee.egr.duke.edu
  143. X
  144. X   USMAIL  Tony Richardson              Tony Richardson
  145. X           Dept of Elect Eng            311 S. LaSalle St. #41B
  146. X           Duke University              Durham, NC 27705
  147. X           Durham, NC 27706
  148. X
  149. X           ph 919-684-3123              ph 919-286-7101
  150. X
  151. Xp.s. I'm trying to make a plplot function library for use with AREXX.
  152. XI'm using Lattice 5.04 with its new features for creating shared
  153. Xlibraries.  I can't seem to get anything to work, though.  If anyone has
  154. Xdone this I would appreciate it if you would contact me so that I can
  155. Xfind out what I'm doing wrong.
  156. X
  157. END_OF_FILE
  158. if test 2659 -ne `wc -c <'README'`; then
  159.     echo shar: \"'README'\" unpacked with wrong size!
  160. fi
  161. # end of 'README'
  162. fi
  163. if test -f 'README.AMIGA' -a "${1}" != "-c" ; then 
  164.   echo shar: Will not clobber existing file \"'README.AMIGA'\"
  165. else
  166. echo shar: Extracting \"'README.AMIGA'\" \(5716 characters\)
  167. sed "s/^X//" >'README.AMIGA' <<'END_OF_FILE'
  168. XFor a color requester I just use the palette program that comes with the
  169. XWorkBench 1.3 enhancer package. PLPLOT looks for this program in TOOLS:
  170. Xand if it's not there it looks in sys:tools, so you'll program want
  171. Xto "assign" tools: to the directory in which the palette program resides.
  172. X
  173. XPLPLOT looks for the fonts in PLFONTS: so make sure it is "assign"ed
  174. Xtoo (put it in your startup sequence).
  175. X
  176. XAbout the Amiga drivers:
  177. X
  178. X   ******
  179. X
  180. X   IFF and Preferences
  181. X
  182. X   Tom Rokicki (thanks!) provided the code for the iff and preferences
  183. X   drivers.
  184. X
  185. X   The IFF driver will prompt for resolution, page size,
  186. X   filename and orientation unless plsetup() and plselect() are used.
  187. X
  188. X   The preferences driver creates a black and white graph on your
  189. X   preferences supported printer. It uses the preferences selected
  190. X   density and page size limits and ignores most of the other stuff.
  191. X   If you have selected "ignore" in the page size limit options
  192. X   (see the 1.3 Enhancer manual) then a full page graph is produced.
  193. X   The other options operate as described in the Enhancer manual.
  194. X   Only "ignore" and "bounded" produce aspect ratio correct plots
  195. X   (usually unimportant unless x and y must have the same scaling
  196. X   like for pie charts or polar plots). You can get very high quality
  197. X   plots with this driver. A full page, high resolution plot
  198. X   requires a lot of memory though (An 8"x10" 300 dpi plot requires
  199. X   (8*300)*(10*300)/8 = 900000 bytes).  You can use the page limits
  200. X   to reduce the memory requirements and still get high quality
  201. X   output.
  202. X
  203. X   ******
  204. X
  205. X   postscript
  206. X
  207. X   The postscript driver was written by Sam Paolucci (thanks!) for
  208. X   the previous version. I don't have a ps printer and so was unable
  209. X   to upgrade the driver to be completely version compatible with this
  210. X   version. (I didn't know how to set the pen width.)
  211. X
  212. X   ******
  213. X
  214. X   Aegis Draw
  215. X
  216. X   I created this one because I have Draw2000 and it was easy to do.
  217. X   I don't know how popular it is. It does provide a very nice
  218. X   method for touching up graphs.
  219. X
  220. X   ******
  221. X
  222. X   HP Plotter (or PLT: device)
  223. X
  224. X   The plt: device is an HP plotter compatible device handler written by
  225. X   Jim Miller and Rich Champeaux. It is freely redistributable, but
  226. X   it is not included with this package (it's big enough already!).
  227. X   It gives high quality output like the preferences driver but with
  228. X   full preferences support. Usually requires less memory (for full
  229. X   page plots) than the preferences driver, but is slower. Highly
  230. X   recommended if you have a color printer or are memory strapped.
  231. X   I don't know exactly which model HP plotter this is compatible
  232. X   with (the HP7470 I think).
  233. X
  234. X   *******
  235. X
  236. X   Amiga window
  237. X
  238. X   I've completely redone this driver.  I hope you agree that it is much
  239. X   nicer. A normal window with standard intuition gadgets is now used.
  240. X   You can resize the window even while the program is plotting in the
  241. X   window (see the "Redraw Enabled" section below).  If you are making
  242. X   several graphs on separate pages, use the close gadget to advance
  243. X   from one "page" to the next.
  244. X
  245. X   "Plplot" menu selections:
  246. X
  247. X       "Save Configuration"
  248. X          - Saves current window configuration (window size, screen type,
  249. X            screen depth, colors, resolution, etc.). The configuration
  250. X            is saved in s:Plplot.def (only 54 bytes).
  251. X
  252. X       "Reset"
  253. X          - Resets the window to the configuration in s:Plplot.def
  254. X            (or to a default config if this file doesn't exist).
  255. X
  256. X       "Maintain Plot Aspect"
  257. X          - If this is checked the plot aspect ratio is maintained as the
  258. X            window is resized (handy for polar plots, etc.). Default
  259. X            is unchecked in which case x and y are stretched
  260. X            independently to fit in the window.
  261. X
  262. X       "Redraw Enabled"
  263. X          - If this is checked, then the graphics commands are buffered
  264. X            in t:plplot.dat. This file is used to redraw the plot when
  265. X            required. It's status is checked only when a new graph is
  266. X            started. The buffer is also used to create the "Full Page"
  267. X            prints under the "Print" selection.
  268. X
  269. X       "Select Screen Type"
  270. X          - A submenu allows the user to select either "Workbench" or
  271. X            "Custom".
  272. X
  273. X       "Print"
  274. X          - There are three submenu options here. The "Bitmap Dump"
  275. X            does just that (with full preferences support). The
  276. X            output is pretty jagged, but you can play around with
  277. X            the preferences stuff (scaling, smoothing, etc.) to
  278. X            improve things. The other two submenus are
  279. X            "Full Page (Landscape)" and "Full Page (Portrait)". This
  280. X            uses the graphics buffer file (see "Redraw Enabled" above)
  281. X            to create graphics output similar to the preferences
  282. X            driver. However the aspect ratio can not be maintained.
  283. X            Same preferences options are used as in preferences driver.
  284. X
  285. X       "Save Bitmap as IFF File"
  286. X          - Self explanatory. You can use this to save your images and
  287. X            then touch them up (do area fills, etc.) with your favorite
  288. X            paint program.
  289. X
  290. X   "Screen Format" selections: (This menu only appears on the custom screen)
  291. X       "Interlaced"
  292. X       "High Resolution"
  293. X       "Number of Colors"
  294. X       "Set Color Palette"
  295. X          - I think these are all self-explanatory. You can select either
  296. X            2, 4, 8, or 16 colors.
  297. X
  298. X
  299. X   Tony Richardson
  300. X
  301. X   EMAIL   amr@dukee.egr.duke.edu
  302. X
  303. X   USMAIL  Tony Richardson              Tony Richardson
  304. X           Dept of Elect Eng            311 S. LaSalle St. #41B
  305. X           Duke University              Durham, NC 27705
  306. X           Durham, NC 27706
  307. X
  308. X           ph 919-684-3123              ph 919-286-7101
  309. X
  310. END_OF_FILE
  311. if test 5716 -ne `wc -c <'README.AMIGA'`; then
  312.     echo shar: \"'README.AMIGA'\" unpacked with wrong size!
  313. fi
  314. # end of 'README.AMIGA'
  315. fi
  316. if test -f 'README.CHANGES' -a "${1}" != "-c" ; then 
  317.   echo shar: Will not clobber existing file \"'README.CHANGES'\"
  318. else
  319. echo shar: Extracting \"'README.CHANGES'\" \(2798 characters\)
  320. sed "s/^X//" >'README.CHANGES' <<'END_OF_FILE'
  321. XSee the documentation for more complete descriptions of the routines
  322. Xmentioned in this file.
  323. X
  324. XIn this version all floating point variables are declared to be of type
  325. XPLFLT.  By appropriately typedef'ing PLFLT you can elect to have
  326. Xeither float's or double's be the default.
  327. X
  328. XEverything is prototyped now. You can override this if your compiler
  329. Xdoes not support prototypes (see plplot.h in the include directory).
  330. X
  331. XPreviously the fonts were hard coded into the code.  Since there are
  332. Xabout 2000 characters available this took up a lot of memory (about
  333. X50k bytes).  Most programs required only a small subset of the total
  334. Xnumber of characters, so I decided to redo the way fonts are handled.
  335. XI've changed things so that the fonts are loaded from a file.
  336. XThere is a standard set of fonts that are loaded automatically when
  337. Xplstar() is called.  The full extended set of fonts can still be
  338. Xloaded by calling a new routine, plfontld()).
  339. X
  340. XThe escape sequence for special characters/fonts has changed from
  341. X'\\' to '#'.
  342. X
  343. Xplgrid3() and plside3() no longer exist.  Their function has been
  344. Xabsorbed into plbox3() and plot3d().
  345. X
  346. Xplot3d(), plbox3(), and plcont() have been changed and are no longer
  347. Xcompatible with old programs that call them.
  348. X
  349. Xplot3d() no longer needs the work array and a new option has been
  350. Xadded. The new option allows sides to be drawn on the graph, it
  351. Xeliminates the old plside3() routine.
  352. X
  353. Xplbox3() has a new option in the zopt string. The option draws lines
  354. Xparallel to the x-y plane behind the figure at the z axis major tick
  355. Xmarks. These lines are not drawn until plot3d is called because of
  356. Xthe need for hidden line removal. This option replaces plside3().
  357. X
  358. XThe array indices for plcont() go from 0 to nx-1 and 0 to ny-1 instead
  359. Xof from 1 to nx and 1 to ny.  This usually results in simpler
  360. Xtransformations from the indices to world coordinates.
  361. X
  362. XThe bugs in plbin() and plhist() have been fixed. They should work as
  363. Xdocumented.
  364. X
  365. Xplfontld() added. See discussion on fonts above.
  366. X
  367. XA mesh drawing routine, plmesh(), has been added.
  368. X
  369. XPolygonal area fills can be done using the new routine plfill().
  370. X
  371. XYou can select a pen width using plwid().
  372. X
  373. Xpllsty() can be used to select 1 of 8 default line styles.
  374. X
  375. XArea fill patterns can be defined using plpat().
  376. X
  377. Xplpsty() can be used to select 1 of 8 different area fill patterns.
  378. X
  379. XThe orientation and output filename can be set using plselect().
  380. X
  381. XFor devices supporting different resolutions and page sizes, you can set
  382. Xthings up using plsetup().
  383. X
  384. XUse plprec() to set the number of characters after the decimal point
  385. Xin numeric labels.
  386. X
  387. XI've made it easier to add new drivers. You shouldn't have to
  388. Xtouch any of the files in the src directory. After writing your new
  389. Xdriver just update the dispatch table in dispatch.c in the drivers
  390. Xdirectory.
  391. X
  392. END_OF_FILE
  393. if test 2798 -ne `wc -c <'README.CHANGES'`; then
  394.     echo shar: \"'README.CHANGES'\" unpacked with wrong size!
  395. fi
  396. # end of 'README.CHANGES'
  397. fi
  398. if test ! -d 'docs' ; then
  399.     echo shar: Creating directory \"'docs'\"
  400.     mkdir 'docs'
  401. fi
  402. if test ! -d 'drivers' ; then
  403.     echo shar: Creating directory \"'drivers'\"
  404.     mkdir 'drivers'
  405. fi
  406. if test -f 'drivers/Makefile' -a "${1}" != "-c" ; then 
  407.   echo shar: Will not clobber existing file \"'drivers/Makefile'\"
  408. else
  409. echo shar: Extracting \"'drivers/Makefile'\" \(256 characters\)
  410. sed "s/^X//" >'drivers/Makefile' <<'END_OF_FILE'
  411. X#
  412. X# Lattice definitions
  413. X#
  414. XCFLAGS = $(LFLG1) $(LFLG2) -i/include -O
  415. XCC = lc
  416. X#
  417. XOBJS  =  aegis.o \
  418. X         dispatch.o \
  419. X         hpplot.o \
  420. X         iff.o \
  421. X         postscript.o \
  422. X         preferences.o
  423. X
  424. X.c.o:
  425. X        $(CC) $(CFLAGS) $*.c
  426. X
  427. Xlib:    $(OBJS)
  428. X
  429. END_OF_FILE
  430. if test 256 -ne `wc -c <'drivers/Makefile'`; then
  431.     echo shar: \"'drivers/Makefile'\" unpacked with wrong size!
  432. fi
  433. # end of 'drivers/Makefile'
  434. fi
  435. if test ! -d 'examples' ; then
  436.     echo shar: Creating directory \"'examples'\"
  437.     mkdir 'examples'
  438. fi
  439. if test -f 'examples/compexam' -a "${1}" != "-c" ; then 
  440.   echo shar: Will not clobber existing file \"'examples/compexam'\"
  441. else
  442. echo shar: Extracting \"'examples/compexam'\" \(776 characters\)
  443. sed "s/^X//" >'examples/compexam' <<'END_OF_FILE'
  444. X.k number/a,lib
  445. X.def lib "FFP"
  446. Xif not "<lib>" eq "FFP"
  447. X   if not "<lib>" eq "IEEEF"
  448. X      if not "<lib>" eq "IEEED"
  449. X         echo "usage: execute compexam # [FFP | IEEEF | IEEED | REXX]"
  450. X         skip end
  451. X      endif
  452. X   endif
  453. Xendif
  454. X
  455. Xif "<lib>" eq "FFP"
  456. X   lc -ff -i/include example<number>
  457. X   blink lib:c.o,example<number>.o to example<number> +
  458. X         lib lib:lcmffp.lib,/pllibs/plpffp.lib,lib:lc.lib
  459. Xendif
  460. X
  461. Xif "<lib>" eq "IEEEF"
  462. X   lc -i/include example<number>
  463. X   blink lib:c.o,example<number>.o to example<number> +
  464. X         lib lib:lcm.lib,/pllibs/plplcmf.lib,lib:lc.lib
  465. Xendif
  466. X
  467. Xif "<lib>" eq "IEEED"
  468. X   lc -dPLDBL -i/include example<number>
  469. X   blink lib:c.o,example<number>.o to example<number> +
  470. X         lib lib:lcm.lib,/pllibs/plplcmd.lib,lib:lc.lib
  471. Xendif
  472. X
  473. Xlab end
  474. X
  475. END_OF_FILE
  476. if test 776 -ne `wc -c <'examples/compexam'`; then
  477.     echo shar: \"'examples/compexam'\" unpacked with wrong size!
  478. fi
  479. # end of 'examples/compexam'
  480. fi
  481. if test -f 'examples/example02.c' -a "${1}" != "-c" ; then 
  482.   echo shar: Will not clobber existing file \"'examples/example02.c'\"
  483. else
  484. echo shar: Extracting \"'examples/example02.c'\" \(819 characters\)
  485. sed "s/^X//" >'examples/example02.c' <<'END_OF_FILE'
  486. X/* Demonstrates multiple windows */
  487. X
  488. X#include "plplot.h"
  489. X#include <stdio.h>
  490. X#include <math.h>
  491. X
  492. Xmain()
  493. X{
  494. X      PLINT i,j;
  495. X      PLFLT vmin,vmax;
  496. X      char text[3];
  497. X
  498. X     /* Divide screen into 16 regions */
  499. X      plstar(4,4);
  500. X      plschr((PLFLT)0.0,(PLFLT)3.5);
  501. X      plfont(4);
  502. X
  503. X      for (i=0; i<=15; i++) {
  504. X        plcol(i/4+1);
  505. X        sprintf(text,"%d",i);
  506. X        pladv(0);
  507. X        vmin = 0.1;
  508. X        vmax = 0.9;
  509. X        for (j=0; j<=2; j++) {
  510. X          plwid(j+1);
  511. X          plvpor(vmin,vmax,vmin,vmax);
  512. X          plwind((PLFLT)0.0,(PLFLT)1.0,(PLFLT)0.0,(PLFLT)1.0);
  513. X          plbox("bc",(PLFLT)0.0,0,"bc",(PLFLT)0.0,0);
  514. X          vmin = vmin + 0.1;
  515. X          vmax = vmax - 0.1;
  516. X        }
  517. X        plwid(1);
  518. X        plptex((PLFLT)0.5,(PLFLT)0.5,(PLFLT)1.0,(PLFLT)0.0,(PLFLT)0.5,text);
  519. X      }
  520. X
  521. X      plend();
  522. X}
  523. X
  524. END_OF_FILE
  525. if test 819 -ne `wc -c <'examples/example02.c'`; then
  526.     echo shar: \"'examples/example02.c'\" unpacked with wrong size!
  527. fi
  528. # end of 'examples/example02.c'
  529. fi
  530. if test -f 'examples/example05.c' -a "${1}" != "-c" ; then 
  531.   echo shar: Will not clobber existing file \"'examples/example05.c'\"
  532. else
  533. echo shar: Extracting \"'examples/example05.c'\" \(385 characters\)
  534. sed "s/^X//" >'examples/example05.c' <<'END_OF_FILE'
  535. X/* Test of drawing a histogram */
  536. X
  537. X#include "plplot.h"
  538. X#include <math.h>
  539. X
  540. Xmain()
  541. X{
  542. X   int i;
  543. X   static float data[2048];
  544. X
  545. X   /* Fill up data points */
  546. X
  547. X   for (i=0; i<2048; i++)
  548. X     data[i]=sin(0.01*(i+1));
  549. X
  550. X   plstar(1,1);
  551. X   plhist(2048,data,-1.1,1.1,44,0);
  552. X   pllab("#frValue","#frFrequency",
  553. X            "#frPLPLOT Example 5 - Probability function of Oscillator");
  554. X
  555. X   plend();
  556. X}
  557. END_OF_FILE
  558. if test 385 -ne `wc -c <'examples/example05.c'`; then
  559.     echo shar: \"'examples/example05.c'\" unpacked with wrong size!
  560. fi
  561. # end of 'examples/example05.c'
  562. fi
  563. if test -f 'examples/example09.c' -a "${1}" != "-c" ; then 
  564.   echo shar: Will not clobber existing file \"'examples/example09.c'\"
  565. else
  566. echo shar: Extracting \"'examples/example09.c'\" \(888 characters\)
  567. sed "s/^X//" >'examples/example09.c' <<'END_OF_FILE'
  568. X/* Demonstration of contour plotting */
  569. X
  570. X#include "plplot.h"
  571. X
  572. X#define NPTS      41
  573. X
  574. Xfloat tr[6] = {0.05, 0.0, -1.0, 0.0, 0.05, -1.0};
  575. X
  576. Xmain()
  577. X{
  578. X   int i, j;
  579. X   float xx, yy;
  580. X   static float clevel[11] = {-1.,-.8,-.6,-.4,-.2,0,.2,.4,.6,.8,1.};
  581. X   static float z[NPTS][NPTS], w[NPTS][NPTS];
  582. X   static int mark=1500, space=1500;
  583. X
  584. X   for (i=0; i<NPTS; i++) {
  585. X     xx = (double)(i-(NPTS/2))/(double)(NPTS/2);
  586. X     for (j=0; j<NPTS; j++)  {
  587. X       yy = (double)(j-(NPTS/2))/(double)(NPTS/2) - 1.0;
  588. X       z[i][j] = xx*xx - yy*yy;
  589. X       w[i][j] = 2*xx*yy;
  590. X     }
  591. X   }
  592. X   plstar(1,1);
  593. X   plenv(-1.0,1.0,-1.0,1.0,0,0);
  594. X   plcol(2);
  595. X   plcont(&z[0][0],NPTS,NPTS,1,NPTS,1,NPTS,clevel,11,xform);
  596. X   plstyl(1,&mark,&space);
  597. X   plcol(3);
  598. X   plcont(&w[0][0],NPTS,NPTS,1,NPTS,1,NPTS,clevel,11,xform);
  599. X   plcol(1);
  600. X   pllab("X Coordinate", "Y Coordinate","Contour Plots of Saddle Points");
  601. X   plend();
  602. X}
  603. END_OF_FILE
  604. if test 888 -ne `wc -c <'examples/example09.c'`; then
  605.     echo shar: \"'examples/example09.c'\" unpacked with wrong size!
  606. fi
  607. # end of 'examples/example09.c'
  608. fi
  609. if test -f 'examples/example10.c' -a "${1}" != "-c" ; then 
  610.   echo shar: Will not clobber existing file \"'examples/example10.c'\"
  611. else
  612. echo shar: Extracting \"'examples/example10.c'\" \(419 characters\)
  613. sed "s/^X//" >'examples/example10.c' <<'END_OF_FILE'
  614. X/* Demonstration program for PLPLOT illustrating absolute positioning */
  615. X/* of graphs on a page */
  616. X
  617. X#include "plplot.h"
  618. X
  619. Xmain()
  620. X{
  621. X   plstar(1,1);
  622. X
  623. X   pladv(0);
  624. X   plvpor(0.0,1.0,0.0,1.0);
  625. X   plwind(0.0,1.0,0.0,1.0);
  626. X   plbox("bc",0.0,0,"bc",0.0,0);
  627. X
  628. X   plsvpa(50.0,150.0,100.0,150.0);
  629. X   plwind(0.0,1.0,0.0,1.0);
  630. X   plbox("bc",0.0,0,"bc",0.0,0);
  631. X   plptex(0.5,0.5,1.0,0.0,0.5,"BOX at (50,150,100,150)");
  632. X
  633. X   plend();
  634. X}
  635. END_OF_FILE
  636. if test 419 -ne `wc -c <'examples/example10.c'`; then
  637.     echo shar: \"'examples/example10.c'\" unpacked with wrong size!
  638. fi
  639. # end of 'examples/example10.c'
  640. fi
  641. if test ! -d 'fonts' ; then
  642.     echo shar: Creating directory \"'fonts'\"
  643.     mkdir 'fonts'
  644. fi
  645. if test -f 'fonts/plstnd.idx.uu' -a "${1}" != "-c" ; then 
  646.   echo shar: Will not clobber existing file \"'fonts/plstnd.idx.uu'\"
  647. else
  648. echo shar: Extracting \"'fonts/plstnd.idx.uu'\" \(521 characters\)
  649. sed "s/^X//" >'fonts/plstnd.idx.uu' <<'END_OF_FILE'
  650. Xbegin 644 plstnd.idx
  651. XM`*L``0`,`"8`.P!-`%L`9@!_`(H`CP"<`*<`KP"]`,@`X`#P`0L!'@$U`3T!F
  652. XM2@%2`6`!:`%Q`7P!AP&A`:D!M`'"`<T!V`'S`?@"`P(+`AD")`(O`D<"4@)B[
  653. XM`FX"=@*+`J("J@*^`M$"Y0+Y`PH#'@,R`ST#5@-C`VX#?`.'`XP#H0.N`\(#"
  654. XMU@/J`_4$"004!"$$*00W!#\$2P16!'`$D02D!+X$UP3L!/<%#`47!2X%/@5=7
  655. XM!7$%@`65!:D%LP7%!=4%ZP8$!A8&+P9&!DH&7@9E!G8&B`:1!J4&OP;'!N<'G
  656. XM`0<)!Q0'(@<S!SX'50=:!V('<@>/!Y0'H0>N![,'N`?`!\@'TP?;!^D(#@@L&
  657. XM"$`(2`A/"%<(90AM"'4(@`BE",((V@CJ"/8(_@D*"1H)+@E""5H)?@FB"=8)Y
  658. X=Y`GR"@X**@HP"C8*4`I9"F8*<PJ`"HT*KPKI"Q$*"
  659. X``
  660. Xend
  661. Xsize 344
  662. END_OF_FILE
  663. if test 521 -ne `wc -c <'fonts/plstnd.idx.uu'`; then
  664.     echo shar: \"'fonts/plstnd.idx.uu'\" unpacked with wrong size!
  665. fi
  666. # end of 'fonts/plstnd.idx.uu'
  667. fi
  668. if test -f 'fonts/plstnd.lkp.uu' -a "${1}" != "-c" ; then 
  669.   echo shar: Will not clobber existing file \"'fonts/plstnd.lkp.uu'\"
  670. else
  671. echo shar: Extracting \"'fonts/plstnd.lkp.uu'\" \(533 characters\)
  672. sed "s/^X//" >'fonts/plstnd.lkp.uu' <<'END_OF_FILE'
  673. Xbegin 644 plstnd.lkp
  674. XM`;``AP"3`(L`C0"&`(P`AP"(`*L`J@"%`(D`B@"'`)$`D@"/`(X`D`"'`)0`C
  675. XME0"6`)<`F`"9`)H`FP"F`*0`I0"G`&4`=`!W`(,`>0"H`(0`=@![`'P`@0!_C
  676. XM`'$`?@!P`'H`9@!G`&@`:0!J`&L`;`!M`&X`;P!R`',`H`"``*$`=0"I``$`'
  677. XM`@`#``0`!0`&``<`"``)``H`"P`,``T`#@`/`!``$0`2`!,`%``5`!8`%P`8K
  678. XM`!D`&@"<`((`G0!X`((`HP`S`#0`-0`V`#<`.``Y`#H`.P`\`#T`/@`_`$``P
  679. XM00!"`$,`1`!%`$8`1P!(`$D`2@!+`$P`G@!]`)\`H@!E`!L`'``=`!X`'P`@`
  680. XM`"$`(@`C`"0`)0`F`"<`*``I`"H`*P`L`"T`+@`O`#``,0`R`$T`3@!/`%``E
  681. XG8@!1`%(`8P!3`%0`50!6`%<`6`!9`%H`6P!<`%T`7@!D`%\`8`!A2
  682. X``
  683. Xend
  684. Xsize 354
  685. END_OF_FILE
  686. if test 533 -ne `wc -c <'fonts/plstnd.lkp.uu'`; then
  687.     echo shar: \"'fonts/plstnd.lkp.uu'\" unpacked with wrong size!
  688. fi
  689. # end of 'fonts/plstnd.lkp.uu'
  690. fi
  691. if test ! -d 'include' ; then
  692.     echo shar: Creating directory \"'include'\"
  693.     mkdir 'include'
  694. fi
  695. if test ! -d 'lattice' ; then
  696.     echo shar: Creating directory \"'lattice'\"
  697.     mkdir 'lattice'
  698. fi
  699. if test -f 'lattice/README' -a "${1}" != "-c" ; then 
  700.   echo shar: Will not clobber existing file \"'lattice/README'\"
  701. else
  702. echo shar: Extracting \"'lattice/README'\" \(775 characters\)
  703. sed "s/^X//" >'lattice/README' <<'END_OF_FILE'
  704. X    Installation of plplot for use with the Lattice C compiler.
  705. X
  706. XA script is provided (make-all) to compile all of the routines and
  707. Xcreate a Lattice compatible library.  You should examine this script
  708. Xand the first part of plplot.h to become familiar with some of the
  709. Xavailable options. (You might want to change some of the default
  710. Xoptions).  To create the plplot library type
  711. X
  712. X  execute make-all [FFP | IEEEF |IEEED]
  713. X
  714. Xwhere the options allow you to create Motorola fast floating point,
  715. XIEEE float, or IEEE double compatible libraries. The library is
  716. Xcreated in the pllibs directory.  You may want to move the library
  717. Xto lib: (the lattice directory containing the link libraries).
  718. XThe libraries are named differently depending on whether you specify
  719. XFFP, IEEEF, or IEEED.
  720. X
  721. X
  722. END_OF_FILE
  723. if test 775 -ne `wc -c <'lattice/README'`; then
  724.     echo shar: \"'lattice/README'\" unpacked with wrong size!
  725. fi
  726. # end of 'lattice/README'
  727. fi
  728. if test -f 'lattice/make-clean' -a "${1}" != "-c" ; then 
  729.   echo shar: Will not clobber existing file \"'lattice/make-clean'\"
  730. else
  731. echo shar: Extracting \"'lattice/make-clean'\" \(75 characters\)
  732. sed "s/^X//" >'lattice/make-clean' <<'END_OF_FILE'
  733. Xdelete /src/#?.o quiet
  734. Xdelete /drivers/#?.o quiet
  735. Xdelete /Amiga/#?.o quiet
  736. END_OF_FILE
  737. if test 75 -ne `wc -c <'lattice/make-clean'`; then
  738.     echo shar: \"'lattice/make-clean'\" unpacked with wrong size!
  739. fi
  740. # end of 'lattice/make-clean'
  741. fi
  742. if test -f 'lattice/make-up' -a "${1}" != "-c" ; then 
  743.   echo shar: Will not clobber existing file \"'lattice/make-up'\"
  744. else
  745. echo shar: Extracting \"'lattice/make-up'\" \(633 characters\)
  746. sed "s/^X//" >'lattice/make-up' <<'END_OF_FILE'
  747. X.key lib
  748. X.def lib "FFP"
  749. X
  750. X; You can use this script to update the library after changing any of the
  751. X; plplot routines.
  752. X
  753. Xif not "<lib>" eq "FFP"
  754. X   if not "<lib>" eq "IEEEF"
  755. X      if not "<lib>" eq "IEEED"
  756. X         echo "usage: execute make-all [FFP | IEEEF | IEEED]"
  757. X         skip end
  758. X      endif
  759. X   endif
  760. Xendif
  761. X
  762. Xif "<lib>" eq "FFP"
  763. X   lmk -f Makefile.inc LFLGS=ff LIB=/pllibs/plpffp.lib
  764. Xendif
  765. X
  766. X; Can't use prototypes here due to Lattice bug :-(
  767. Xif "<lib>" eq "IEEEF"
  768. X   lmk -f Makefile.inc LFLGS=dNOPROTS LIB=/pllibs/plplcmf.lib
  769. Xendif
  770. X
  771. Xif "<lib>" eq "IEEED"
  772. X   lmk -f Makefile.inc LFLGS=dPLDBL LIB=/pllibs/plplcmd.lib
  773. Xendif
  774. X
  775. Xlab end
  776. END_OF_FILE
  777. if test 633 -ne `wc -c <'lattice/make-up'`; then
  778.     echo shar: \"'lattice/make-up'\" unpacked with wrong size!
  779. fi
  780. # end of 'lattice/make-up'
  781. fi
  782. if test ! -d 'pllibs' ; then
  783.     echo shar: Creating directory \"'pllibs'\"
  784.     mkdir 'pllibs'
  785. fi
  786. if test -f 'pllibs/dummy' -a "${1}" != "-c" ; then 
  787.   echo shar: Will not clobber existing file \"'pllibs/dummy'\"
  788. else
  789. echo shar: Extracting \"'pllibs/dummy'\" \(55 characters\)
  790. sed "s/^X//" >'pllibs/dummy' <<'END_OF_FILE'
  791. XJust a placeholder so that zoo creates this directory.
  792. END_OF_FILE
  793. if test 55 -ne `wc -c <'pllibs/dummy'`; then
  794.     echo shar: \"'pllibs/dummy'\" unpacked with wrong size!
  795. fi
  796. # end of 'pllibs/dummy'
  797. fi
  798. if test ! -d 'src' ; then
  799.     echo shar: Creating directory \"'src'\"
  800.     mkdir 'src'
  801. fi
  802. if test -f 'src/icnvrt.c' -a "${1}" != "-c" ; then 
  803.   echo shar: Will not clobber existing file \"'src/icnvrt.c'\"
  804. else
  805. echo shar: Extracting \"'src/icnvrt.c'\" \(799 characters\)
  806. sed "s/^X//" >'src/icnvrt.c' <<'END_OF_FILE'
  807. X/* Coordinate transformations for plotting package */
  808. X/* Convertion routines yielding an integer result  */
  809. X
  810. X#include "plplot.h"
  811. X#include "declare.h"
  812. X
  813. X/* dcpc. converts device coordinates to physical coordinates */
  814. X
  815. XPLINT dcpcx(x)
  816. XPLFLT x;
  817. X{
  818. X      return(round(dpxoff + dpxscl * x));
  819. X}
  820. X
  821. XPLINT dcpcy(y)
  822. XPLFLT y;
  823. X{
  824. X      return(round(dpyoff + dpyscl * y));
  825. X}
  826. X
  827. X/* mmpc. converts millimetres from bottom left-hand corner to physical */
  828. X/* coordinates */
  829. X
  830. XPLINT mmpcx(x)
  831. XPLFLT x;
  832. X{
  833. X      return(round(mpxoff + mpxscl * x));
  834. X}
  835. X
  836. XPLINT mmpcy(y)
  837. XPLFLT y;
  838. X{
  839. X      return(round(mpyoff + mpyscl * y));
  840. X}
  841. X
  842. X/* wcpc. converts world coordinates to physical coordinates */
  843. X
  844. XPLINT wcpcx(x)
  845. XPLFLT x;
  846. X{
  847. X      return(round(wpxoff + wpxscl * x));
  848. X}
  849. X
  850. XPLINT wcpcy(y)
  851. XPLFLT y;
  852. X{
  853. X      return(round(wpyoff + wpyscl * y));
  854. X}
  855. X
  856. END_OF_FILE
  857. if test 799 -ne `wc -c <'src/icnvrt.c'`; then
  858.     echo shar: \"'src/icnvrt.c'\" unpacked with wrong size!
  859. fi
  860. # end of 'src/icnvrt.c'
  861. fi
  862. if test -f 'src/movphy.c' -a "${1}" != "-c" ; then 
  863.   echo shar: Will not clobber existing file \"'src/movphy.c'\"
  864. else
  865. echo shar: Extracting \"'src/movphy.c'\" \(349 characters\)
  866. sed "s/^X//" >'src/movphy.c' <<'END_OF_FILE'
  867. X/*      MOVE AND DRAW ROUTINES IN PHYSICAL COORDINATES                */
  868. X
  869. X/* Move to physical coordinates (x,y) */
  870. X
  871. X#include "plplot.h"
  872. X
  873. Xvoid movphy(x,y)
  874. XPLINT x,y;
  875. X{
  876. X      scurr(x,y);
  877. X}
  878. X
  879. X/* Draws to physical coordinates (x,y) */
  880. X
  881. Xvoid draphy(x,y)
  882. XPLINT x,y;
  883. X{
  884. X      PLINT currx, curry;
  885. X      gcurr(&currx,&curry);
  886. X      pllclp(currx,curry,x,y);
  887. X}
  888. X
  889. END_OF_FILE
  890. if test 349 -ne `wc -c <'src/movphy.c'`; then
  891.     echo shar: \"'src/movphy.c'\" unpacked with wrong size!
  892. fi
  893. # end of 'src/movphy.c'
  894. fi
  895. if test -f 'src/movwor.c' -a "${1}" != "-c" ; then 
  896.   echo shar: Will not clobber existing file \"'src/movwor.c'\"
  897. else
  898. echo shar: Extracting \"'src/movwor.c'\" \(335 characters\)
  899. sed "s/^X//" >'src/movwor.c' <<'END_OF_FILE'
  900. X/* MOVE AND DRAW ROUTINES IN WORLD COORDINATES */
  901. X
  902. X/* Move to world coordinates (x,y) */
  903. X
  904. X#include "plplot.h"
  905. X
  906. Xvoid movwor(x,y)
  907. XPLFLT x,y;
  908. X{
  909. X   scurr(wcpcx(x),wcpcy(y));
  910. X}
  911. X
  912. X/* Draws to world coordinates (x,y) */
  913. X
  914. Xvoid drawor(x,y)
  915. XPLFLT x,y;
  916. X{
  917. X   PLINT currx, curry;
  918. X   gcurr(&currx,&curry);
  919. X   pllclp(currx,curry,wcpcx(x),wcpcy(y));
  920. X}
  921. END_OF_FILE
  922. if test 335 -ne `wc -c <'src/movwor.c'`; then
  923.     echo shar: \"'src/movwor.c'\" unpacked with wrong size!
  924. fi
  925. # end of 'src/movwor.c'
  926. fi
  927. if test -f 'src/pl3cut.c' -a "${1}" != "-c" ; then 
  928.   echo shar: Will not clobber existing file \"'src/pl3cut.c'\"
  929. else
  930. echo shar: Extracting \"'src/pl3cut.c'\" \(918 characters\)
  931. sed "s/^X//" >'src/pl3cut.c' <<'END_OF_FILE'
  932. X/* Determines the point of intersection (cx,cy) between the line */
  933. X/* joining (sx1,sy1) to (sx2,sy2) and the line joining */
  934. X/* (su1,sv1) to (su2,sv2). */
  935. X
  936. X#include "plplot.h"
  937. X
  938. Xvoid pl3cut(sx1,sy1,sx2,sy2,su1,sv1,su2,sv2,cx,cy)
  939. XPLINT sx1, sy1, sx2, sy2, su1, sv1, su2, sv2, *cx, *cy;
  940. X{
  941. X      PLINT x21, y21, u21, v21, yv1, xu1, a, b;
  942. X      PLFLT fa, fb;
  943. X
  944. X      x21 = sx2 - sx1;
  945. X      y21 = sy2 - sy1;
  946. X      u21 = su2 - su1;
  947. X      v21 = sv2 - sv1;
  948. X      yv1 = sy1 - sv1;
  949. X      xu1 = sx1 - su1;
  950. X
  951. X      a = x21 * v21 - y21 * u21;
  952. X      fa = (PLFLT)a;
  953. X      if (a == 0) {
  954. X        if (sx2 < su2) {
  955. X          *cx = sx2;
  956. X          *cy = sy2;
  957. X        }
  958. X        else {
  959. X          *cx = su2;
  960. X          *cy = sv2;
  961. X        }
  962. X        return;
  963. X      }
  964. X      else {
  965. X        b = yv1 * u21 - xu1 * v21;
  966. X        fb = (PLFLT)b;
  967. X        *cx = (PLINT)(sx1 + (fb * x21)/ fa + .5);
  968. X        *cy = (PLINT)(sy1 + (fb * y21)/ fa + .5);
  969. X      }
  970. X}
  971. END_OF_FILE
  972. if test 918 -ne `wc -c <'src/pl3cut.c'`; then
  973.     echo shar: \"'src/pl3cut.c'\" unpacked with wrong size!
  974. fi
  975. # end of 'src/pl3cut.c'
  976. fi
  977. if test -f 'src/plabv.c' -a "${1}" != "-c" ; then 
  978.   echo shar: Will not clobber existing file \"'src/plabv.c'\"
  979. else
  980. echo shar: Extracting \"'src/plabv.c'\" \(518 characters\)
  981. sed "s/^X//" >'src/plabv.c' <<'END_OF_FILE'
  982. X#include "plplot.h"
  983. X
  984. X/* Determines if point (px,py) lies above the line joining (sx1,sy1) to */
  985. X/* (sx2,sy2). It only works correctly if sx1 <= px <= sx2  */
  986. X
  987. XPLINT plabv(px, py, sx1, sy1, sx2, sy2)
  988. XPLINT px, py, sx1, sy1, sx2, sy2;
  989. X{
  990. X      PLINT above;
  991. X
  992. X      if (py >= sy1 && py >= sy2)
  993. X        above = 1;
  994. X      else if (py < sy1 && py < sy2)
  995. X        above = 0;
  996. X      else if ((PLFLT)(sx2-sx1) * (py-sy1) > (PLFLT)(px-sx1) * (sy2-sy1))
  997. X        above = 1;
  998. X      else
  999. X        above = 0;
  1000. X
  1001. X      return((PLINT)above);
  1002. X}
  1003. END_OF_FILE
  1004. if test 518 -ne `wc -c <'src/plabv.c'`; then
  1005.     echo shar: \"'src/plabv.c'\" unpacked with wrong size!
  1006. fi
  1007. # end of 'src/plabv.c'
  1008. fi
  1009. if test -f 'src/pladv.c' -a "${1}" != "-c" ; then 
  1010.   echo shar: Will not clobber existing file \"'src/pladv.c'\"
  1011. else
  1012. echo shar: Extracting \"'src/pladv.c'\" \(744 characters\)
  1013. sed "s/^X//" >'src/pladv.c' <<'END_OF_FILE'
  1014. X/* Advance to subpage "page", or to the next one if "page" = 0 */
  1015. X
  1016. X#include "plplot.h"
  1017. X
  1018. Xvoid pladv(page)
  1019. XPLINT page;
  1020. X{
  1021. X      PLINT cursub, nsubx, nsuby;
  1022. X      PLINT device, termin, graphx;
  1023. X      PLINT level;
  1024. X
  1025. X      glev(&level);
  1026. X      if (level < 1) plexit("Please call plstar before calling pladv.");
  1027. X
  1028. X      gdev(&device,&termin,&graphx);
  1029. X      gsub(&nsubx,&nsuby,&cursub);
  1030. X      if (page > 0 && page <= nsubx*nsuby)
  1031. X        cursub = page;
  1032. X      else if (page == 0) {
  1033. X        if (cursub == nsubx*nsuby) {
  1034. X          plclr();
  1035. X          plpage();
  1036. X          cursub = 1;
  1037. X        }
  1038. X        else
  1039. X          cursub = cursub + 1;
  1040. X      }
  1041. X      else
  1042. X        plexit("Invalid subpage number in pladv.");
  1043. X
  1044. X      ssub(nsubx,nsuby,cursub);
  1045. X      setsub();
  1046. X}
  1047. X
  1048. END_OF_FILE
  1049. if test 744 -ne `wc -c <'src/pladv.c'`; then
  1050.     echo shar: \"'src/pladv.c'\" unpacked with wrong size!
  1051. fi
  1052. # end of 'src/pladv.c'
  1053. fi
  1054. if test -f 'src/plbeg.c' -a "${1}" != "-c" ; then 
  1055.   echo shar: Will not clobber existing file \"'src/plbeg.c'\"
  1056. else
  1057. echo shar: Extracting \"'src/plbeg.c'\" \(748 characters\)
  1058. sed "s/^X//" >'src/plbeg.c' <<'END_OF_FILE'
  1059. X/* Sets up the device "dev" for plotting, dividing the page into "nx" */
  1060. X/* by "ny" subpages. */
  1061. X
  1062. X#include "plplot.h"
  1063. X#include <math.h>
  1064. X
  1065. Xvoid plbeg(dev,nx,ny)
  1066. XPLINT dev, nx, ny;
  1067. X{
  1068. X   PLFLT scale, def, ht;
  1069. X
  1070. X   if ((nx <= 0) || (ny <= 0 ))
  1071. X      plexit("Cannot have negative number of subpages in plstar.");
  1072. X
  1073. X   scale = 1.0/sqrt((double)ny);
  1074. X   slev(1);
  1075. X   grbeg(dev);
  1076. X   ssub(nx,ny,0);
  1077. X
  1078. X   /* Set up character, symbol and tick sizes for requested number of */
  1079. X   /* subpages */
  1080. X
  1081. X   gchr(&def,&ht);
  1082. X   schr((PLFLT)(def*scale),(PLFLT)(def*scale));
  1083. X   gsym(&def,&ht);
  1084. X   ssym((PLFLT)(def*scale),(PLFLT)(def*scale));
  1085. X   gmaj(&def,&ht);
  1086. X   smaj((PLFLT)(def*scale),(PLFLT)(def*scale));
  1087. X   gmin(&def,&ht);
  1088. X   smin((PLFLT)(def*scale),(PLFLT)(def*scale));
  1089. X}
  1090. END_OF_FILE
  1091. if test 748 -ne `wc -c <'src/plbeg.c'`; then
  1092.     echo shar: \"'src/plbeg.c'\" unpacked with wrong size!
  1093. fi
  1094. # end of 'src/plbeg.c'
  1095. fi
  1096. if test -f 'src/plclr.c' -a "${1}" != "-c" ; then 
  1097.   echo shar: Will not clobber existing file \"'src/plclr.c'\"
  1098. else
  1099. echo shar: Extracting \"'src/plclr.c'\" \(160 characters\)
  1100. sed "s/^X//" >'src/plclr.c' <<'END_OF_FILE'
  1101. X#include "plplot.h"
  1102. X
  1103. Xvoid plclr()
  1104. X{
  1105. X   PLINT level;
  1106. X   glev(&level);
  1107. X   if (level < 1)
  1108. X      plexit("Please call plstar before calling plclr.");
  1109. X
  1110. X   grclr();
  1111. X}
  1112. END_OF_FILE
  1113. if test 160 -ne `wc -c <'src/plclr.c'`; then
  1114.     echo shar: \"'src/plclr.c'\" unpacked with wrong size!
  1115. fi
  1116. # end of 'src/plclr.c'
  1117. fi
  1118. if test -f 'src/plcol.c' -a "${1}" != "-c" ; then 
  1119.   echo shar: Will not clobber existing file \"'src/plcol.c'\"
  1120. else
  1121. echo shar: Extracting \"'src/plcol.c'\" \(336 characters\)
  1122. sed "s/^X//" >'src/plcol.c' <<'END_OF_FILE'
  1123. X/* Sets line color */
  1124. X
  1125. X#include "plplot.h"
  1126. X
  1127. Xvoid plcol(color)
  1128. XPLINT color;
  1129. X{
  1130. X      PLINT font,col;
  1131. X      PLINT level;
  1132. X
  1133. X      glev(&level);
  1134. X      if (level < 1)  plexit("Please call plstar before calling plcol.");
  1135. X      if (color < 0)  plexit("Invalid color in plcol.");
  1136. X
  1137. X      gatt(&font,&col);
  1138. X      satt(font,color);
  1139. X      grcol();
  1140. X}
  1141. END_OF_FILE
  1142. if test 336 -ne `wc -c <'src/plcol.c'`; then
  1143.     echo shar: \"'src/plcol.c'\" unpacked with wrong size!
  1144. fi
  1145. # end of 'src/plcol.c'
  1146. fi
  1147. if test -f 'src/plcvec.c' -a "${1}" != "-c" ; then 
  1148.   echo shar: Will not clobber existing file \"'src/plcvec.c'\"
  1149. else
  1150. echo shar: Extracting \"'src/plcvec.c'\" \(719 characters\)
  1151. sed "s/^X//" >'src/plcvec.c' <<'END_OF_FILE'
  1152. X/* Gets the character digitisation of Hershey table entry "char" */
  1153. X/* Returns 1 if there is a valid entry */
  1154. X
  1155. Xextern short int *fntbffr;
  1156. Xextern short int *fntindx;
  1157. Xextern short int indxleng;
  1158. X
  1159. X#include "plplot.h"
  1160. X#define STLEN     250
  1161. X
  1162. Xstatic SCHAR xygrid[STLEN];
  1163. X
  1164. Xstruct point {
  1165. X   SCHAR x, y;
  1166. X};
  1167. X
  1168. XPLINT plcvec(ch,xygr)
  1169. XPLINT ch;
  1170. XSCHAR **xygr;
  1171. X{
  1172. X
  1173. X   PLINT k=0, ib;
  1174. X   struct point *pt;
  1175. X
  1176. X   ch--;
  1177. X   if (ch < 0 || ch >= indxleng) return((PLINT)0);
  1178. X   ib = fntindx[ch]-2;
  1179. X   if (ib == -2) return((PLINT)0);
  1180. X
  1181. X   do {
  1182. X     ib++;
  1183. X     pt = (struct point *)&fntbffr[ib];
  1184. X     xygrid[k++]=pt->x;
  1185. X     xygrid[k++]=pt->y;
  1186. X   } while ((pt->x != 64 || pt->y != 64) && k <= (STLEN-2));
  1187. X
  1188. X   *xygr = xygrid;
  1189. X   return((PLINT)1);
  1190. X}
  1191. X
  1192. END_OF_FILE
  1193. if test 719 -ne `wc -c <'src/plcvec.c'`; then
  1194.     echo shar: \"'src/plcvec.c'\" unpacked with wrong size!
  1195. fi
  1196. # end of 'src/plcvec.c'
  1197. fi
  1198. if test -f 'src/plend.c' -a "${1}" != "-c" ; then 
  1199.   echo shar: Will not clobber existing file \"'src/plend.c'\"
  1200. else
  1201. echo shar: Extracting \"'src/plend.c'\" \(261 characters\)
  1202. sed "s/^X//" >'src/plend.c' <<'END_OF_FILE'
  1203. X/* Ends a plotting session */
  1204. X
  1205. X#include "plplot.h"
  1206. X#include "declare.h"
  1207. X
  1208. Xvoid plend()
  1209. X{
  1210. X   PLINT dev, term, gra, level;
  1211. X
  1212. X   glev(&level);
  1213. X   if (level == 0) return;
  1214. X   gdev(&dev,&term,&gra);
  1215. X   if (gra != 0) pltext();
  1216. X   plfontrel();
  1217. X   grtidy();
  1218. X   slev(0);
  1219. X}
  1220. END_OF_FILE
  1221. if test 261 -ne `wc -c <'src/plend.c'`; then
  1222.     echo shar: \"'src/plend.c'\" unpacked with wrong size!
  1223. fi
  1224. # end of 'src/plend.c'
  1225. fi
  1226. if test -f 'src/plerrx.c' -a "${1}" != "-c" ; then 
  1227.   echo shar: Will not clobber existing file \"'src/plerrx.c'\"
  1228. else
  1229. echo shar: Extracting \"'src/plerrx.c'\" \(346 characters\)
  1230. sed "s/^X//" >'src/plerrx.c' <<'END_OF_FILE'
  1231. X/* Plots horizontal error bars (xmin(i),y(i)) to (xmax(i),y(i)) */
  1232. X
  1233. X#include "plplot.h"
  1234. X
  1235. Xvoid plerrx(n,xmin,xmax,y)
  1236. XPLINT n;
  1237. XPLFLT *xmin, *xmax, *y;
  1238. X{
  1239. X      PLINT level;
  1240. X      short i;
  1241. X
  1242. X      glev(&level);
  1243. X      if (level < 3) plexit("Please set up window before calling plerrx.");
  1244. X      for (i=0;i<n;i++)
  1245. X        plerx1(xmin[i],xmax[i],y[i]);
  1246. X}
  1247. END_OF_FILE
  1248. if test 346 -ne `wc -c <'src/plerrx.c'`; then
  1249.     echo shar: \"'src/plerrx.c'\" unpacked with wrong size!
  1250. fi
  1251. # end of 'src/plerrx.c'
  1252. fi
  1253. if test -f 'src/plerry.c' -a "${1}" != "-c" ; then 
  1254.   echo shar: Will not clobber existing file \"'src/plerry.c'\"
  1255. else
  1256. echo shar: Extracting \"'src/plerry.c'\" \(342 characters\)
  1257. sed "s/^X//" >'src/plerry.c' <<'END_OF_FILE'
  1258. X/* Plots vertical error bars (x,ymin(i)) to (x(i),ymax(i)) */
  1259. X
  1260. X#include "plplot.h"
  1261. X
  1262. Xvoid plerry(n,x,ymin,ymax)
  1263. XPLINT n;
  1264. XPLFLT *x, *ymin, *ymax;
  1265. X{
  1266. X      PLINT level;
  1267. X      short i;
  1268. X
  1269. X      glev(&level);
  1270. X      if (level < 3) plexit("Please set up window before calling plerry.");
  1271. X      for(i=0; i<n; i++)
  1272. X        plery1(x[i],ymin[i],ymax[i]);
  1273. X}
  1274. END_OF_FILE
  1275. if test 342 -ne `wc -c <'src/plerry.c'`; then
  1276.     echo shar: \"'src/plerry.c'\" unpacked with wrong size!
  1277. fi
  1278. # end of 'src/plerry.c'
  1279. fi
  1280. if test -f 'src/plerx1.c' -a "${1}" != "-c" ; then 
  1281.   echo shar: Will not clobber existing file \"'src/plerx1.c'\"
  1282. else
  1283. echo shar: Extracting \"'src/plerx1.c'\" \(425 characters\)
  1284. sed "s/^X//" >'src/plerx1.c' <<'END_OF_FILE'
  1285. X/* Plots single horizontal error bar */
  1286. X
  1287. X#include "plplot.h"
  1288. X#include <math.h>
  1289. X
  1290. Xvoid plerx1(xmin,xmax,y)
  1291. XPLFLT xmin, xmax, y;
  1292. X{
  1293. X      PLFLT mindef, minht, xpmm, ypmm;
  1294. X      PLINT yminor;
  1295. X
  1296. X      gmin(&mindef,&minht);
  1297. X      gpixmm(&xpmm,&ypmm);
  1298. X      yminor = max(1.0,minht*ypmm);
  1299. X      movwor(xmin,y);
  1300. X      plxtik(wcpcx(xmin),wcpcy(y),yminor,yminor);
  1301. X      drawor(xmax,y);
  1302. X      plxtik(wcpcx(xmax),wcpcy(y),yminor,yminor);
  1303. X}
  1304. END_OF_FILE
  1305. if test 425 -ne `wc -c <'src/plerx1.c'`; then
  1306.     echo shar: \"'src/plerx1.c'\" unpacked with wrong size!
  1307. fi
  1308. # end of 'src/plerx1.c'
  1309. fi
  1310. if test -f 'src/plery1.c' -a "${1}" != "-c" ; then 
  1311.   echo shar: Will not clobber existing file \"'src/plery1.c'\"
  1312. else
  1313. echo shar: Extracting \"'src/plery1.c'\" \(423 characters\)
  1314. sed "s/^X//" >'src/plery1.c' <<'END_OF_FILE'
  1315. X/* Plots single vertical error bar */
  1316. X
  1317. X#include "plplot.h"
  1318. X#include <math.h>
  1319. X
  1320. Xvoid plery1(x,ymin,ymax)
  1321. XPLFLT x, ymin, ymax;
  1322. X{
  1323. X      PLFLT mindef, minht, xpmm, ypmm;
  1324. X      PLINT xminor;
  1325. X
  1326. X      gmin(&mindef,&minht);
  1327. X      gpixmm(&xpmm,&ypmm);
  1328. X      xminor = max(1.0,minht*xpmm);
  1329. X      movwor(x,ymin);
  1330. X      plytik(wcpcx(x),wcpcy(ymin),xminor,xminor);
  1331. X      drawor(x,ymax);
  1332. X      plytik(wcpcx(x),wcpcy(ymax),xminor,xminor);
  1333. X}
  1334. END_OF_FILE
  1335. if test 423 -ne `wc -c <'src/plery1.c'`; then
  1336.     echo shar: \"'src/plery1.c'\" unpacked with wrong size!
  1337. fi
  1338. # end of 'src/plery1.c'
  1339. fi
  1340. if test -f 'src/plexit.c' -a "${1}" != "-c" ; then 
  1341.   echo shar: Will not clobber existing file \"'src/plexit.c'\"
  1342. else
  1343. echo shar: Extracting \"'src/plexit.c'\" \(506 characters\)
  1344. sed "s/^X//" >'src/plexit.c' <<'END_OF_FILE'
  1345. X/* In case of an error this routine is called.  It just prints out the
  1346. X   error message and trys to clean up as much as possible.
  1347. X   The user should write his/her own pl_exit() routine, if cleanup needs to
  1348. X   be done in the user program. */
  1349. X
  1350. X#include "plplot.h"
  1351. X#include <stdio.h>
  1352. X
  1353. Xvoid plexit(errormsg)
  1354. Xchar *errormsg;
  1355. X{
  1356. X   PLINT level;
  1357. X   void pl_exit();
  1358. X
  1359. X   fprintf(stderr,"\n%s\n",errormsg);
  1360. X   glev(&level);
  1361. X   if(level > 0) grtidy();
  1362. X   plfontrel();
  1363. X   pl_exit();
  1364. X   exit(1);
  1365. X}
  1366. X
  1367. Xvoid pl_exit()
  1368. X{
  1369. X}
  1370. X
  1371. X
  1372. END_OF_FILE
  1373. if test 506 -ne `wc -c <'src/plexit.c'`; then
  1374.     echo shar: \"'src/plexit.c'\" unpacked with wrong size!
  1375. fi
  1376. # end of 'src/plexit.c'
  1377. fi
  1378. if test -f 'src/plfont.c' -a "${1}" != "-c" ; then 
  1379.   echo shar: Will not clobber existing file \"'src/plfont.c'\"
  1380. else
  1381. echo shar: Extracting \"'src/plfont.c'\" \(313 characters\)
  1382. sed "s/^X//" >'src/plfont.c' <<'END_OF_FILE'
  1383. X#include "plplot.h"
  1384. X
  1385. Xvoid plfont(ifont)
  1386. XPLINT ifont;
  1387. X{
  1388. X      PLINT ifnt,icol;
  1389. X      PLINT level;
  1390. X
  1391. X      glev(&level);
  1392. X      if (level < 1) plexit("Please call plstar before calling plfont.");
  1393. X
  1394. X      if (ifont < 1 || ifont > 4) plexit("Invalid font in plfont.");
  1395. X      gatt(&ifnt,&icol);
  1396. X      satt(ifont,icol);
  1397. X}
  1398. END_OF_FILE
  1399. if test 313 -ne `wc -c <'src/plfont.c'`; then
  1400.     echo shar: \"'src/plfont.c'\" unpacked with wrong size!
  1401. fi
  1402. # end of 'src/plfont.c'
  1403. fi
  1404. if test -f 'src/plgra.c' -a "${1}" != "-c" ; then 
  1405.   echo shar: Will not clobber existing file \"'src/plgra.c'\"
  1406. else
  1407. echo shar: Extracting \"'src/plgra.c'\" \(190 characters\)
  1408. sed "s/^X//" >'src/plgra.c' <<'END_OF_FILE'
  1409. X/* Switches to graphics mode */
  1410. X
  1411. X#include "plplot.h"
  1412. X
  1413. Xvoid plgra()
  1414. X{
  1415. X      PLINT level;
  1416. X      glev(&level);
  1417. X      if (level < 1) plexit("Please call plstar before plgra.");
  1418. X      grgra();
  1419. X}
  1420. END_OF_FILE
  1421. if test 190 -ne `wc -c <'src/plgra.c'`; then
  1422.     echo shar: \"'src/plgra.c'\" unpacked with wrong size!
  1423. fi
  1424. # end of 'src/plgra.c'
  1425. fi
  1426. if test -f 'src/plgspa.c' -a "${1}" != "-c" ; then 
  1427.   echo shar: Will not clobber existing file \"'src/plgspa.c'\"
  1428. else
  1429. echo shar: Extracting \"'src/plgspa.c'\" \(506 characters\)
  1430. sed "s/^X//" >'src/plgspa.c' <<'END_OF_FILE'
  1431. X/* Gets subpage boundaries in absolute coordinates (mm from bottom */
  1432. X/* left-hand corner of page) */
  1433. X
  1434. X#include "plplot.h"
  1435. X
  1436. Xvoid plgspa(xmin,xmax,ymin,ymax)
  1437. XPLFLT *xmin, *xmax, *ymin, *ymax;
  1438. X{
  1439. X      PLFLT spdxmi, spdxma, spdymi, spdyma;
  1440. X      PLINT level;
  1441. X
  1442. X      glev(&level);
  1443. X      if (level < 1) plexit("Please call plstar before plgspa.");
  1444. X      gspd(&spdxmi,&spdxma,&spdymi,&spdyma);
  1445. X      *xmin = dcmmx(spdxmi);
  1446. X      *xmax = dcmmx(spdxma);
  1447. X      *ymin = dcmmy(spdymi);
  1448. X      *ymax = dcmmy(spdyma);
  1449. X}
  1450. END_OF_FILE
  1451. if test 506 -ne `wc -c <'src/plgspa.c'`; then
  1452.     echo shar: \"'src/plgspa.c'\" unpacked with wrong size!
  1453. fi
  1454. # end of 'src/plgspa.c'
  1455. fi
  1456. if test -f 'src/pljoin.c' -a "${1}" != "-c" ; then 
  1457.   echo shar: Will not clobber existing file \"'src/pljoin.c'\"
  1458. else
  1459. echo shar: Extracting \"'src/pljoin.c'\" \(108 characters\)
  1460. sed "s/^X//" >'src/pljoin.c' <<'END_OF_FILE'
  1461. X#include "plplot.h"
  1462. X
  1463. Xvoid pljoin(x1,y1,x2,y2)
  1464. XPLFLT x1, x2, y1, y2;
  1465. X{
  1466. X   movwor(x1,y1);
  1467. X   drawor(x2,y2);
  1468. X}
  1469. END_OF_FILE
  1470. if test 108 -ne `wc -c <'src/pljoin.c'`; then
  1471.     echo shar: \"'src/pljoin.c'\" unpacked with wrong size!
  1472. fi
  1473. # end of 'src/pljoin.c'
  1474. fi
  1475. if test -f 'src/pllab.c' -a "${1}" != "-c" ; then 
  1476.   echo shar: Will not clobber existing file \"'src/pllab.c'\"
  1477. else
  1478. echo shar: Extracting \"'src/pllab.c'\" \(412 characters\)
  1479. sed "s/^X//" >'src/pllab.c' <<'END_OF_FILE'
  1480. X/* Simple routine for labelling graphs */
  1481. X
  1482. X#include "plplot.h"
  1483. X
  1484. Xvoid pllab(xlabel, ylabel, tlabel)
  1485. Xchar *xlabel, *ylabel, *tlabel;
  1486. X{
  1487. X   PLINT level;
  1488. X
  1489. X   glev(&level);
  1490. X   if (level < 2) plexit("Please set up viewport before calling pllab.");
  1491. X
  1492. X   plmtex("t",(PLFLT)2.0,(PLFLT)0.5,(PLFLT)0.5,tlabel);
  1493. X   plmtex("b",(PLFLT)3.2,(PLFLT)0.5,(PLFLT)0.5,xlabel);
  1494. X   plmtex("l",(PLFLT)5.0,(PLFLT)0.5,(PLFLT)0.5,ylabel);
  1495. X}
  1496. END_OF_FILE
  1497. if test 412 -ne `wc -c <'src/pllab.c'`; then
  1498.     echo shar: \"'src/pllab.c'\" unpacked with wrong size!
  1499. fi
  1500. # end of 'src/pllab.c'
  1501. fi
  1502. if test -f 'src/plline.c' -a "${1}" != "-c" ; then 
  1503.   echo shar: Will not clobber existing file \"'src/plline.c'\"
  1504. else
  1505. echo shar: Extracting \"'src/plline.c'\" \(261 characters\)
  1506. sed "s/^X//" >'src/plline.c' <<'END_OF_FILE'
  1507. X#include "plplot.h"
  1508. X
  1509. Xvoid plline(n,x,y)
  1510. XPLINT n;
  1511. XPLFLT *x, *y;
  1512. X{
  1513. X      PLINT i, level;
  1514. X
  1515. X      glev(&level);
  1516. X      if (level<3) plexit("Please set up window before calling plline.");
  1517. X      movwor(x[0],y[0]);
  1518. X      for(i=1; i<n; i++)
  1519. X        drawor(x[i],y[i]);
  1520. X}
  1521. END_OF_FILE
  1522. if test 261 -ne `wc -c <'src/plline.c'`; then
  1523.     echo shar: \"'src/plline.c'\" unpacked with wrong size!
  1524. fi
  1525. # end of 'src/plline.c'
  1526. fi
  1527. if test -f 'src/plmesh.c' -a "${1}" != "-c" ; then 
  1528.   echo shar: Will not clobber existing file \"'src/plmesh.c'\"
  1529. else
  1530. echo shar: Extracting \"'src/plmesh.c'\" \(677 characters\)
  1531. sed "s/^X//" >'src/plmesh.c' <<'END_OF_FILE'
  1532. X/* Plots a mesh representation of the function z[x][y]. The x values */
  1533. X/* are stored as x[0..nx-1], the y values as y[0..ny-1], and the */
  1534. X/* z values are in the 2-d array z[][0..ly-1]. The integer "opt" */
  1535. X/* specifies: */
  1536. X/*  opt = 1:  Draw lines parallel to x-axis */
  1537. X/*  opt = 2:  Draw lines parallel to y-axis */
  1538. X/*  opt = 3:  Draw lines parallel to both axes */
  1539. X
  1540. X#include "plplot.h"
  1541. X#ifdef PLSTDC
  1542. X#include <stdlib.h>
  1543. X#else
  1544. Xextern void free();
  1545. X#endif
  1546. X
  1547. Xextern PLINT pl3mode;
  1548. Xextern PLINT *oldloview;
  1549. X
  1550. Xvoid plmesh(x,y,z,ly,nx,ny,opt)
  1551. XPLINT ly, nx, ny, opt;
  1552. XPLFLT *x, *y, *z;
  1553. X{
  1554. X   pl3mode = 1;
  1555. X   plot3d(x,y,z,ly,nx,ny,opt,0);
  1556. X
  1557. X   free((VOID *)oldloview);
  1558. X   pl3mode = 0;
  1559. X}
  1560. END_OF_FILE
  1561. if test 677 -ne `wc -c <'src/plmesh.c'`; then
  1562.     echo shar: \"'src/plmesh.c'\" unpacked with wrong size!
  1563. fi
  1564. # end of 'src/plmesh.c'
  1565. fi
  1566. if test -f 'src/plpage.c' -a "${1}" != "-c" ; then 
  1567.   echo shar: Will not clobber existing file \"'src/plpage.c'\"
  1568. else
  1569. echo shar: Extracting \"'src/plpage.c'\" \(52 characters\)
  1570. sed "s/^X//" >'src/plpage.c' <<'END_OF_FILE'
  1571. X#include "plplot.h"
  1572. X
  1573. Xvoid plpage()
  1574. X{
  1575. X   grpage();
  1576. X}
  1577. END_OF_FILE
  1578. if test 52 -ne `wc -c <'src/plpage.c'`; then
  1579.     echo shar: \"'src/plpage.c'\" unpacked with wrong size!
  1580. fi
  1581. # end of 'src/plpage.c'
  1582. fi
  1583. if test -f 'src/plpat.c' -a "${1}" != "-c" ; then 
  1584.   echo shar: Will not clobber existing file \"'src/plpat.c'\"
  1585. else
  1586. echo shar: Extracting \"'src/plpat.c'\" \(479 characters\)
  1587. sed "s/^X//" >'src/plpat.c' <<'END_OF_FILE'
  1588. X/* Sets line width */
  1589. X
  1590. X#include "plplot.h"
  1591. X#include "declare.h"
  1592. X
  1593. Xvoid plpat(nlin,inc,del)
  1594. XPLINT nlin, *inc, *del;
  1595. X{
  1596. X   PLINT i, level;
  1597. X
  1598. X   glev(&level);
  1599. X   if (level < 1)  plexit("Please call plstar before calling plpat.");
  1600. X   if(nlin<1 || nlin>2) plexit("Only 1 or 2 line styles allowed in plpat.");
  1601. X
  1602. X   nps = nlin;
  1603. X   for(i=0; i<nlin; i++) {
  1604. X      inclin[i] = inc[i];
  1605. X      delta[i] = del[i];
  1606. X      if(del[i] < 0)plexit("Line spacing must be greater than 0 in plpat.");
  1607. X   }
  1608. X}
  1609. END_OF_FILE
  1610. if test 479 -ne `wc -c <'src/plpat.c'`; then
  1611.     echo shar: \"'src/plpat.c'\" unpacked with wrong size!
  1612. fi
  1613. # end of 'src/plpat.c'
  1614. fi
  1615. if test -f 'src/plpoi1.c' -a "${1}" != "-c" ; then 
  1616.   echo shar: Will not clobber existing file \"'src/plpoi1.c'\"
  1617. else
  1618. echo shar: Extracting \"'src/plpoi1.c'\" \(301 characters\)
  1619. sed "s/^X//" >'src/plpoi1.c' <<'END_OF_FILE'
  1620. X#include "plplot.h"
  1621. X
  1622. Xextern short int *fntlkup;
  1623. Xextern short int numberfonts, numberchars;
  1624. X
  1625. Xvoid plpoi1(x,y,code)
  1626. XPLFLT x,y;
  1627. XPLINT code;
  1628. X{
  1629. X   PLINT sym, font, col;
  1630. X
  1631. X   /* Initialize parameters. */
  1632. X   gatt(&font,&col);
  1633. X   sym = *(fntlkup+(font-1)*numberchars+code);
  1634. X   plhrsh(sym,wcpcx(x),wcpcy(y));
  1635. X}
  1636. END_OF_FILE
  1637. if test 301 -ne `wc -c <'src/plpoi1.c'`; then
  1638.     echo shar: \"'src/plpoi1.c'\" unpacked with wrong size!
  1639. fi
  1640. # end of 'src/plpoi1.c'
  1641. fi
  1642. if test -f 'src/plpoin.c' -a "${1}" != "-c" ; then 
  1643.   echo shar: Will not clobber existing file \"'src/plpoin.c'\"
  1644. else
  1645. echo shar: Extracting \"'src/plpoin.c'\" \(431 characters\)
  1646. sed "s/^X//" >'src/plpoin.c' <<'END_OF_FILE'
  1647. X/* Plots single precision array y against x for n points using */
  1648. X/* ASCII code "code" */
  1649. X
  1650. X#include "plplot.h"
  1651. X
  1652. Xvoid plpoin(n,x,y,code)
  1653. XPLINT n, code;
  1654. XPLFLT *x, *y;
  1655. X{
  1656. X      short int i;
  1657. X      PLINT level;
  1658. X
  1659. X      glev(&level);
  1660. X      if (level < 3) plexit("Please set up window before calling plpoin.");
  1661. X      if (code < 0 || code > 127) plexit("Invalid code in plpoin.");
  1662. X
  1663. X      for(i=0; i<n; i++)
  1664. X        plpoi1(x[i],y[i],code);
  1665. X}
  1666. END_OF_FILE
  1667. if test 431 -ne `wc -c <'src/plpoin.c'`; then
  1668.     echo shar: \"'src/plpoin.c'\" unpacked with wrong size!
  1669. fi
  1670. # end of 'src/plpoin.c'
  1671. fi
  1672. if test -f 'src/plr135.c' -a "${1}" != "-c" ; then 
  1673.   echo shar: Will not clobber existing file \"'src/plr135.c'\"
  1674. else
  1675. echo shar: Extracting \"'src/plr135.c'\" \(135 characters\)
  1676. sed "s/^X//" >'src/plr135.c' <<'END_OF_FILE'
  1677. X#include "plplot.h"
  1678. X
  1679. Xvoid plr135(ix,iy,isens)
  1680. XPLINT *ix, *iy, isens;
  1681. X{
  1682. X      *ix = -*ix;
  1683. X      *iy = -*iy;
  1684. X      plr45(ix,iy,isens);
  1685. X}
  1686. END_OF_FILE
  1687. if test 135 -ne `wc -c <'src/plr135.c'`; then
  1688.     echo shar: \"'src/plr135.c'\" unpacked with wrong size!
  1689. fi
  1690. # end of 'src/plr135.c'
  1691. fi
  1692. if test -f 'src/plr45.c' -a "${1}" != "-c" ; then 
  1693.   echo shar: Will not clobber existing file \"'src/plr45.c'\"
  1694. else
  1695. echo shar: Extracting \"'src/plr45.c'\" \(239 characters\)
  1696. sed "s/^X//" >'src/plr45.c' <<'END_OF_FILE'
  1697. X#include "plplot.h"
  1698. X#include <math.h>
  1699. X
  1700. Xvoid plr45(ix,iy,isens)
  1701. XPLINT *ix, *iy, isens;
  1702. X{
  1703. X      PLINT ixx, iyy;
  1704. X
  1705. X      ixx = *ix-isens*(*iy);
  1706. X      iyy = *ix * isens + *iy;
  1707. X      *ix = ixx/max(1,abs(ixx));
  1708. X      *iy = iyy/max(1,abs(iyy));
  1709. X}
  1710. END_OF_FILE
  1711. if test 239 -ne `wc -c <'src/plr45.c'`; then
  1712.     echo shar: \"'src/plr45.c'\" unpacked with wrong size!
  1713. fi
  1714. # end of 'src/plr45.c'
  1715. fi
  1716. if test -f 'src/plschr.c' -a "${1}" != "-c" ; then 
  1717.   echo shar: Will not clobber existing file \"'src/plschr.c'\"
  1718. else
  1719. echo shar: Extracting \"'src/plschr.c'\" \(231 characters\)
  1720. sed "s/^X//" >'src/plschr.c' <<'END_OF_FILE'
  1721. X#include "plplot.h"
  1722. X
  1723. Xvoid plschr(def,scale)
  1724. XPLFLT def,scale;
  1725. X{
  1726. X    PLFLT defalt, ht;
  1727. X
  1728. X    if (def != 0.0)
  1729. X       schr(def,(PLFLT)(scale*def));
  1730. X    else {
  1731. X       gchr(&defalt,&ht);
  1732. X       schr(defalt,(PLFLT)(scale*defalt));
  1733. X    }
  1734. X}
  1735. END_OF_FILE
  1736. if test 231 -ne `wc -c <'src/plschr.c'`; then
  1737.     echo shar: \"'src/plschr.c'\" unpacked with wrong size!
  1738. fi
  1739. # end of 'src/plschr.c'
  1740. fi
  1741. if test -f 'src/plsmaj.c' -a "${1}" != "-c" ; then 
  1742.   echo shar: Will not clobber existing file \"'src/plsmaj.c'\"
  1743. else
  1744. echo shar: Extracting \"'src/plsmaj.c'\" \(231 characters\)
  1745. sed "s/^X//" >'src/plsmaj.c' <<'END_OF_FILE'
  1746. X#include "plplot.h"
  1747. X
  1748. Xvoid plsmaj(def,scale)
  1749. XPLFLT def,scale;
  1750. X{
  1751. X    PLFLT defalt, ht;
  1752. X
  1753. X    if (def != 0.0)
  1754. X       smaj(def,(PLFLT)(scale*def));
  1755. X    else {
  1756. X       gmaj(&defalt,&ht);
  1757. X       smaj(defalt,(PLFLT)(scale*defalt));
  1758. X    }
  1759. X}
  1760. END_OF_FILE
  1761. if test 231 -ne `wc -c <'src/plsmaj.c'`; then
  1762.     echo shar: \"'src/plsmaj.c'\" unpacked with wrong size!
  1763. fi
  1764. # end of 'src/plsmaj.c'
  1765. fi
  1766. if test -f 'src/plsmin.c' -a "${1}" != "-c" ; then 
  1767.   echo shar: Will not clobber existing file \"'src/plsmin.c'\"
  1768. else
  1769. echo shar: Extracting \"'src/plsmin.c'\" \(233 characters\)
  1770. sed "s/^X//" >'src/plsmin.c' <<'END_OF_FILE'
  1771. X#include "plplot.h"
  1772. X
  1773. Xvoid plsmin(def,scale)
  1774. XPLFLT def, scale;
  1775. X{
  1776. X    PLFLT defalt, ht;
  1777. X
  1778. X    if (def !=  0.0)
  1779. X       smin(def,(PLFLT)(scale*def));
  1780. X    else {
  1781. X       gmin(&defalt,&ht);
  1782. X       smin(defalt,(PLFLT)(scale*defalt));
  1783. X    }
  1784. X}
  1785. END_OF_FILE
  1786. if test 233 -ne `wc -c <'src/plsmin.c'`; then
  1787.     echo shar: \"'src/plsmin.c'\" unpacked with wrong size!
  1788. fi
  1789. # end of 'src/plsmin.c'
  1790. fi
  1791. if test -f 'src/plssym.c' -a "${1}" != "-c" ; then 
  1792.   echo shar: Will not clobber existing file \"'src/plssym.c'\"
  1793. else
  1794. echo shar: Extracting \"'src/plssym.c'\" \(230 characters\)
  1795. sed "s/^X//" >'src/plssym.c' <<'END_OF_FILE'
  1796. X#include "plplot.h"
  1797. X
  1798. Xvoid plssym(def,scale)
  1799. XPLFLT def,scale;
  1800. X{
  1801. X    PLFLT defalt,ht;
  1802. X
  1803. X    if (def != 0.0)
  1804. X       ssym(def,(PLFLT)(scale*def));
  1805. X    else {
  1806. X       gsym(&defalt,&ht);
  1807. X       ssym(defalt,(PLFLT)(scale*defalt));
  1808. X    }
  1809. X}
  1810. END_OF_FILE
  1811. if test 230 -ne `wc -c <'src/plssym.c'`; then
  1812.     echo shar: \"'src/plssym.c'\" unpacked with wrong size!
  1813. fi
  1814. # end of 'src/plssym.c'
  1815. fi
  1816. if test -f 'src/plstik.c' -a "${1}" != "-c" ; then 
  1817.   echo shar: Will not clobber existing file \"'src/plstik.c'\"
  1818. else
  1819. echo shar: Extracting \"'src/plstik.c'\" \(298 characters\)
  1820. sed "s/^X//" >'src/plstik.c' <<'END_OF_FILE'
  1821. X/* Draws a slanting tick at position (mx,my) (measured in mm) of */
  1822. X/* vector length (dx,dy) */
  1823. X
  1824. X#include "plplot.h"
  1825. X
  1826. Xvoid plstik(mx,my,dx,dy)
  1827. XPLFLT mx, my, dx, dy;
  1828. X{
  1829. X      draphy(mmpcx(mx),mmpcy(my));
  1830. X      draphy(mmpcx((PLFLT)(mx+dx)),mmpcy((PLFLT)(my+dy)));
  1831. X      draphy(mmpcx(mx),mmpcy(my));
  1832. X}
  1833. END_OF_FILE
  1834. if test 298 -ne `wc -c <'src/plstik.c'`; then
  1835.     echo shar: \"'src/plstik.c'\" unpacked with wrong size!
  1836. fi
  1837. # end of 'src/plstik.c'
  1838. fi
  1839. if test -f 'src/plsym.c' -a "${1}" != "-c" ; then 
  1840.   echo shar: Will not clobber existing file \"'src/plsym.c'\"
  1841. else
  1842. echo shar: Extracting \"'src/plsym.c'\" \(420 characters\)
  1843. sed "s/^X//" >'src/plsym.c' <<'END_OF_FILE'
  1844. X/* Plots single precision array y against x for n points using */
  1845. X/* Hershey symbol "code" */
  1846. X
  1847. X#include "plplot.h"
  1848. X
  1849. Xvoid plsym(n,x,y,code)
  1850. XPLINT n, code;
  1851. XPLFLT x[],y[];
  1852. X{
  1853. X      short int i;
  1854. X      PLINT level;
  1855. X
  1856. X      glev(&level);
  1857. X      if (level < 3) plexit("Please set up window before calling plsym.");
  1858. X      if (code < 0) plexit("Invalid code in plsym.");
  1859. X
  1860. X      for (i=0; i<n; i++)
  1861. X        plsym1(x[i],y[i],code);
  1862. X}
  1863. END_OF_FILE
  1864. if test 420 -ne `wc -c <'src/plsym.c'`; then
  1865.     echo shar: \"'src/plsym.c'\" unpacked with wrong size!
  1866. fi
  1867. # end of 'src/plsym.c'
  1868. fi
  1869. if test -f 'src/plsym1.c' -a "${1}" != "-c" ; then 
  1870.   echo shar: Will not clobber existing file \"'src/plsym1.c'\"
  1871. else
  1872. echo shar: Extracting \"'src/plsym1.c'\" \(108 characters\)
  1873. sed "s/^X//" >'src/plsym1.c' <<'END_OF_FILE'
  1874. X#include "plplot.h"
  1875. X
  1876. Xvoid plsym1(x,y,code)
  1877. XPLFLT x,y;
  1878. XPLINT code;
  1879. X{
  1880. X      plhrsh(code,wcpcx(x),wcpcy(y));
  1881. X}
  1882. END_OF_FILE
  1883. if test 108 -ne `wc -c <'src/plsym1.c'`; then
  1884.     echo shar: \"'src/plsym1.c'\" unpacked with wrong size!
  1885. fi
  1886. # end of 'src/plsym1.c'
  1887. fi
  1888. if test -f 'src/pltext.c' -a "${1}" != "-c" ; then 
  1889.   echo shar: Will not clobber existing file \"'src/pltext.c'\"
  1890. else
  1891. echo shar: Extracting \"'src/pltext.c'\" \(204 characters\)
  1892. sed "s/^X//" >'src/pltext.c' <<'END_OF_FILE'
  1893. X/* Switches back to text mode */
  1894. X
  1895. X#include "plplot.h"
  1896. X
  1897. Xvoid pltext()
  1898. X{
  1899. X      PLINT level;
  1900. X
  1901. X      glev(&level);
  1902. X      if (level < 1) plexit("Please call plstar before calling pltext.");
  1903. X
  1904. X      grtext();
  1905. X}
  1906. END_OF_FILE
  1907. if test 204 -ne `wc -c <'src/pltext.c'`; then
  1908.     echo shar: \"'src/pltext.c'\" unpacked with wrong size!
  1909. fi
  1910. # end of 'src/pltext.c'
  1911. fi
  1912. if test -f 'src/plvsta.c' -a "${1}" != "-c" ; then 
  1913.   echo shar: Will not clobber existing file \"'src/plvsta.c'\"
  1914. else
  1915. echo shar: Extracting \"'src/plvsta.c'\" \(891 characters\)
  1916. sed "s/^X//" >'src/plvsta.c' <<'END_OF_FILE'
  1917. X/* Defines a "standard" viewport with seven character heights for   */
  1918. X/* the left margin and four character heights everywhere else       */
  1919. X
  1920. X#include "plplot.h"
  1921. X
  1922. Xvoid plvsta()
  1923. X{
  1924. X    PLFLT xmin, xmax, ymin, ymax;
  1925. X    PLFLT chrdef, chrht, spdxmi, spdxma, spdymi, spdyma;
  1926. X    PLINT level;
  1927. X
  1928. X    glev(&level);
  1929. X    if (level < 1) plexit("Please call plstar before calling plvsta.");
  1930. X
  1931. X    gchr(&chrdef,&chrht);
  1932. X    gspd(&spdxmi,&spdxma,&spdymi,&spdyma);
  1933. X
  1934. X/*  Find out position of subpage boundaries in millimetres, reduce by */
  1935. X/*  the desired border, and convert back into normalized subpage */
  1936. X/*  coordinates */
  1937. X
  1938. X    xmin = dcscx(mmdcx((PLFLT)(dcmmx(spdxmi) + 7 * chrht)));
  1939. X    xmax = dcscx(mmdcx((PLFLT)(dcmmx(spdxma) - 4 * chrht)));
  1940. X    ymin = dcscy(mmdcy((PLFLT)(dcmmy(spdymi) + 4 * chrht)));
  1941. X    ymax = dcscy(mmdcy((PLFLT)(dcmmy(spdyma) - 4 * chrht)));
  1942. X
  1943. X    plvpor(xmin,xmax,ymin,ymax);
  1944. X}
  1945. END_OF_FILE
  1946. if test 891 -ne `wc -c <'src/plvsta.c'`; then
  1947.     echo shar: \"'src/plvsta.c'\" unpacked with wrong size!
  1948. fi
  1949. # end of 'src/plvsta.c'
  1950. fi
  1951. if test -f 'src/plwid.c' -a "${1}" != "-c" ; then 
  1952.   echo shar: Will not clobber existing file \"'src/plwid.c'\"
  1953. else
  1954. echo shar: Extracting \"'src/plwid.c'\" \(228 characters\)
  1955. sed "s/^X//" >'src/plwid.c' <<'END_OF_FILE'
  1956. X/* Sets line width */
  1957. X
  1958. X#include "plplot.h"
  1959. X
  1960. Xvoid plwid(width)
  1961. XPLINT width;
  1962. X{
  1963. X      PLINT level;
  1964. X
  1965. X      glev(&level);
  1966. X      if (level < 1)  plexit("Please call plstar before calling plwid.");
  1967. X
  1968. X      swid(width);
  1969. X      grwid();
  1970. X}
  1971. END_OF_FILE
  1972. if test 228 -ne `wc -c <'src/plwid.c'`; then
  1973.     echo shar: \"'src/plwid.c'\" unpacked with wrong size!
  1974. fi
  1975. # end of 'src/plwid.c'
  1976. fi
  1977. if test -f 'src/plxtik.c' -a "${1}" != "-c" ; then 
  1978.   echo shar: Will not clobber existing file \"'src/plxtik.c'\"
  1979. else
  1980. echo shar: Extracting \"'src/plxtik.c'\" \(200 characters\)
  1981. sed "s/^X//" >'src/plxtik.c' <<'END_OF_FILE'
  1982. X#include "plplot.h"
  1983. X
  1984. Xvoid plxtik(x,y,below,above)
  1985. XPLINT x, y, below, above;
  1986. X{
  1987. X      draphy(x,y);
  1988. X      if (below != 0) draphy(x,y-below);
  1989. X      if (above != 0) draphy(x,y+above);
  1990. X      draphy(x,y);
  1991. X}
  1992. END_OF_FILE
  1993. if test 200 -ne `wc -c <'src/plxtik.c'`; then
  1994.     echo shar: \"'src/plxtik.c'\" unpacked with wrong size!
  1995. fi
  1996. # end of 'src/plxtik.c'
  1997. fi
  1998. if test -f 'src/plytik.c' -a "${1}" != "-c" ; then 
  1999.   echo shar: Will not clobber existing file \"'src/plytik.c'\"
  2000. else
  2001. echo shar: Extracting \"'src/plytik.c'\" \(196 characters\)
  2002. sed "s/^X//" >'src/plytik.c' <<'END_OF_FILE'
  2003. X#include "plplot.h"
  2004. X
  2005. Xvoid plytik(x,y,left,right)
  2006. XPLINT x, y, left, right;
  2007. X{
  2008. X      draphy(x,y);
  2009. X      if (left != 0) draphy(x-left,y);
  2010. X      if (right != 0) draphy(x+right,y);
  2011. X      draphy(x,y);
  2012. X}
  2013. END_OF_FILE
  2014. if test 196 -ne `wc -c <'src/plytik.c'`; then
  2015.     echo shar: \"'src/plytik.c'\" unpacked with wrong size!
  2016. fi
  2017. # end of 'src/plytik.c'
  2018. fi
  2019. if test -f 'src/setphy.c' -a "${1}" != "-c" ; then 
  2020.   echo shar: Will not clobber existing file \"'src/setphy.c'\"
  2021. else
  2022. echo shar: Extracting \"'src/setphy.c'\" \(570 characters\)
  2023. sed "s/^X//" >'src/setphy.c' <<'END_OF_FILE'
  2024. X/* Sets up physical limits of plotting device and the mapping between */
  2025. X/* normalized device coordinates and physical coordinates */
  2026. X
  2027. X#include "plplot.h"
  2028. X
  2029. Xvoid setphy(xmin,xmax,ymin,ymax)
  2030. XPLINT xmin,xmax,ymin,ymax;
  2031. X{
  2032. X    PLFLT xpmm, ypmm, mpxscl, mpyscl;
  2033. X
  2034. X    sphy(xmin,xmax,ymin,ymax);
  2035. X    sdp((PLFLT)(xmax-xmin),(PLFLT)(xmin),(PLFLT)(ymax-ymin),
  2036. X         (PLFLT)(ymin));
  2037. X
  2038. X    gpixmm(&xpmm,&ypmm);
  2039. X    mpxscl = xpmm;
  2040. X    if (xmax <= xmin) mpxscl = -xpmm;
  2041. X    mpyscl = ypmm;
  2042. X    if (ymax <= ymin) mpyscl = -ypmm;
  2043. X    smp(mpxscl,(PLFLT)(xmin), mpyscl,(PLFLT)(ymin));
  2044. X}
  2045. X
  2046. END_OF_FILE
  2047. if test 570 -ne `wc -c <'src/setphy.c'`; then
  2048.     echo shar: \"'src/setphy.c'\" unpacked with wrong size!
  2049. fi
  2050. # end of 'src/setphy.c'
  2051. fi
  2052. if test -f 'src/setpxl.c' -a "${1}" != "-c" ; then 
  2053.   echo shar: Will not clobber existing file \"'src/setpxl.c'\"
  2054. else
  2055. echo shar: Extracting \"'src/setpxl.c'\" \(247 characters\)
  2056. sed "s/^X//" >'src/setpxl.c' <<'END_OF_FILE'
  2057. X/* Sets up pixel size from the number of pixels/mm in each direction */
  2058. X
  2059. X#include "plplot.h"
  2060. X#include "declare.h"
  2061. X
  2062. Xvoid setpxl(xpmm0,ypmm0)
  2063. XPLFLT xpmm0,ypmm0;
  2064. X{
  2065. X    xpmm = xpmm0;
  2066. X    ypmm = ypmm0;
  2067. X    umx  = 1000.0/xpmm;
  2068. X    umy  = 1000.0/ypmm;
  2069. X}
  2070. END_OF_FILE
  2071. if test 247 -ne `wc -c <'src/setpxl.c'`; then
  2072.     echo shar: \"'src/setpxl.c'\" unpacked with wrong size!
  2073. fi
  2074. # end of 'src/setpxl.c'
  2075. fi
  2076. if test -f 'src/setsub.c' -a "${1}" != "-c" ; then 
  2077.   echo shar: Will not clobber existing file \"'src/setsub.c'\"
  2078. else
  2079. echo shar: Extracting \"'src/setsub.c'\" \(793 characters\)
  2080. sed "s/^X//" >'src/setsub.c' <<'END_OF_FILE'
  2081. X/* Sets up the subpage boundaries according to the current subpage  */
  2082. X/* selected */
  2083. X
  2084. X#include "plplot.h"
  2085. X
  2086. Xvoid setsub()
  2087. X{
  2088. X      PLINT ix, iy;
  2089. X      PLINT nsubx, nsuby, cursub;
  2090. X      PLFLT spdxmi, spdxma, spdymi, spdyma;
  2091. X      PLINT sppxmi, sppxma, sppymi, sppyma;
  2092. X
  2093. X      gsub(&nsubx,&nsuby,&cursub);
  2094. X      ix = (cursub-1)%nsubx;
  2095. X      iy = nsuby - (cursub-1)/nsubx;
  2096. X
  2097. X      spdxmi = (PLFLT)(ix)/(PLFLT)(nsubx);
  2098. X      spdxma = (PLFLT)(ix+1)/(PLFLT)(nsubx);
  2099. X      spdymi = (PLFLT)(iy-1)/(PLFLT)(nsuby);
  2100. X      spdyma = (PLFLT)(iy)/(PLFLT)(nsuby);
  2101. X      sspd(spdxmi,spdxma,spdymi,spdyma);
  2102. X
  2103. X      sppxmi = dcpcx(spdxmi);
  2104. X      sppxma = dcpcx(spdxma);
  2105. X      sppymi = dcpcy(spdymi);
  2106. X      sppyma = dcpcy(spdyma);
  2107. X      sspp(sppxmi,sppxma,sppymi,sppyma);
  2108. X
  2109. X      sclp(sppxmi,sppxma,sppymi,sppyma);
  2110. X
  2111. X}
  2112. END_OF_FILE
  2113. if test 793 -ne `wc -c <'src/setsub.c'`; then
  2114.     echo shar: \"'src/setsub.c'\" unpacked with wrong size!
  2115. fi
  2116. # end of 'src/setsub.c'
  2117. fi
  2118. if test -f 'src/stindex.c' -a "${1}" != "-c" ; then 
  2119.   echo shar: Will not clobber existing file \"'src/stindex.c'\"
  2120. else
  2121. echo shar: Extracting \"'src/stindex.c'\" \(453 characters\)
  2122. sed "s/^X//" >'src/stindex.c' <<'END_OF_FILE'
  2123. X#include "plplot.h"
  2124. X
  2125. XPLINT stindex(str1,str2)
  2126. Xchar *str1,*str2;
  2127. X{
  2128. X    PLINT base;
  2129. X    PLINT str1ind;
  2130. X    PLINT str2ind;
  2131. X
  2132. X    for(base=0; *(str1+base)!='\0'; base++) {
  2133. X        for(str1ind=base, str2ind=0; *(str2+str2ind)!='\0' &&
  2134. X            *(str2+str2ind) == *(str1+str1ind); str1ind++, str2ind++)
  2135. X            ;   /* no body */
  2136. X
  2137. X        if(*(str2+str2ind) == '\0')
  2138. X            return((PLINT)base);
  2139. X    }
  2140. X    return((PLINT)-1);    /* search failed */
  2141. X}
  2142. END_OF_FILE
  2143. if test 453 -ne `wc -c <'src/stindex.c'`; then
  2144.     echo shar: \"'src/stindex.c'\" unpacked with wrong size!
  2145. fi
  2146. # end of 'src/stindex.c'
  2147. fi
  2148. if test -f 'src/strpos.c' -a "${1}" != "-c" ; then 
  2149.   echo shar: Will not clobber existing file \"'src/strpos.c'\"
  2150. else
  2151. echo shar: Extracting \"'src/strpos.c'\" \(493 characters\)
  2152. sed "s/^X//" >'src/strpos.c' <<'END_OF_FILE'
  2153. X/* Searches string str for first occurence of character chr.  If found */
  2154. X/* the position of the character in the string is returned (the first  */
  2155. X/* character has position 0).  If the character is not found a -1 is   */
  2156. X/* returned. */
  2157. X
  2158. X#include "plplot.h"
  2159. X#ifdef PLSTDC
  2160. X#include <string.h>
  2161. X#else
  2162. Xextern char *strchr();
  2163. X#endif
  2164. X
  2165. XPLINT strpos(str,chr)
  2166. Xchar *str,chr;
  2167. X{
  2168. X    char *temp;
  2169. X
  2170. X    if (temp = strchr(str,chr))
  2171. X        return((PLINT)(temp - str));
  2172. X    else
  2173. X        return((PLINT)-1);
  2174. X}
  2175. END_OF_FILE
  2176. if test 493 -ne `wc -c <'src/strpos.c'`; then
  2177.     echo shar: \"'src/strpos.c'\" unpacked with wrong size!
  2178. fi
  2179. # end of 'src/strpos.c'
  2180. fi
  2181. if test -f 'src/stsearch.c' -a "${1}" != "-c" ; then 
  2182.   echo shar: Will not clobber existing file \"'src/stsearch.c'\"
  2183. else
  2184. echo shar: Extracting \"'src/stsearch.c'\" \(367 characters\)
  2185. sed "s/^X//" >'src/stsearch.c' <<'END_OF_FILE'
  2186. X/* Searches string str for character chr (case insensitive) */
  2187. X
  2188. X#include "plplot.h"
  2189. X#include <ctype.h>
  2190. X#ifdef PLSTDC
  2191. X#include <string.h>
  2192. X#else
  2193. Xextern char *strchr();
  2194. X#endif
  2195. X
  2196. XPLINT stsearch(str,chr)
  2197. Xchar *str,chr;
  2198. X{
  2199. X    if (strchr(str,chr))
  2200. X        return((PLINT)1);
  2201. X    else if(strchr(str,toupper(chr)))
  2202. X        return((PLINT)1);
  2203. X    else
  2204. X        return((PLINT)0);
  2205. X}
  2206. END_OF_FILE
  2207. if test 367 -ne `wc -c <'src/stsearch.c'`; then
  2208.     echo shar: \"'src/stsearch.c'\" unpacked with wrong size!
  2209. fi
  2210. # end of 'src/stsearch.c'
  2211. fi
  2212. if test -f 'src/xform.c' -a "${1}" != "-c" ; then 
  2213.   echo shar: Will not clobber existing file \"'src/xform.c'\"
  2214. else
  2215. echo shar: Extracting \"'src/xform.c'\" \(170 characters\)
  2216. sed "s/^X//" >'src/xform.c' <<'END_OF_FILE'
  2217. X#include "plplot.h"
  2218. X
  2219. Xextern PLFLT tr[];
  2220. X
  2221. Xvoid xform(x,y,tx,ty)
  2222. XPLFLT x, y, *tx, *ty;
  2223. X{
  2224. X   *tx = tr[0] * x + tr[1] * y + tr[2];
  2225. X   *ty = tr[3] * x + tr[4] * y + tr[5];
  2226. X}
  2227. X
  2228. END_OF_FILE
  2229. if test 170 -ne `wc -c <'src/xform.c'`; then
  2230.     echo shar: \"'src/xform.c'\" unpacked with wrong size!
  2231. fi
  2232. # end of 'src/xform.c'
  2233. fi
  2234. if test ! -d 'unix' ; then
  2235.     echo shar: Creating directory \"'unix'\"
  2236.     mkdir 'unix'
  2237. fi
  2238. if test -f 'unix/README' -a "${1}" != "-c" ; then 
  2239.   echo shar: Will not clobber existing file \"'unix/README'\"
  2240. else
  2241. echo shar: Extracting \"'unix/README'\" \(519 characters\)
  2242. sed "s/^X//" >'unix/README' <<'END_OF_FILE'
  2243. XSorry, I don't offer much help here.  You'll need to create a library
  2244. Xwith all the stuff in the src and this directory in it. (You don't need
  2245. Xthe Amiga or drivers directories).  
  2246. X
  2247. XBe sure to set things up correctly in plplot.h in the include directory.
  2248. XEspecially the font directory location!
  2249. X
  2250. XI've written a set of stub routines so that the library can be used
  2251. Xfrom a Fortan program.  They are not provided, but if you want them
  2252. Xjust contact me. I'll galdly give them to you. (These may not work
  2253. Xon all unix systems).
  2254. END_OF_FILE
  2255. if test 519 -ne `wc -c <'unix/README'`; then
  2256.     echo shar: \"'unix/README'\" unpacked with wrong size!
  2257. fi
  2258. # end of 'unix/README'
  2259. fi
  2260. echo shar: End of archive 1 \(of 12\).
  2261. cp /dev/null ark1isdone
  2262. MISSING=""
  2263. for I in 1 2 3 4 5 6 7 8 9 10 11 12 ; do
  2264.     if test ! -f ark${I}isdone ; then
  2265.     MISSING="${MISSING} ${I}"
  2266.     fi
  2267. done
  2268. if test "${MISSING}" = "" ; then
  2269.     echo You have unpacked all 12 archives.
  2270.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2271. else
  2272.     echo You still need to unpack the following archives:
  2273.     echo "        " ${MISSING}
  2274. fi
  2275. ##  End of shell archive.
  2276. exit 0
  2277. -- 
  2278. Submissions to comp.sources.amiga and comp.binaries.amiga should be sent to:
  2279.     amiga@cs.odu.edu    
  2280. or    amiga@xanth.cs.odu.edu    ( obsolescent mailers may need this address )
  2281. or    ...!uunet!xanth!amiga    ( very obsolescent mailers need this address )
  2282.  
  2283. Comments, questions, and suggestions s should be addressed to ``amiga-request''
  2284. (only use ``amiga'' for submissions) at the above addresses.
  2285.